board-bockw-reference.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Bock-W board support
  3. *
  4. * Copyright (C) 2013 Renesas Solutions Corp.
  5. * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; version 2 of the License.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include <linux/of_platform.h>
  21. #include <linux/pinctrl/machine.h>
  22. #include <mach/common.h>
  23. #include <mach/r8a7778.h>
  24. #include <asm/mach/arch.h>
  25. /*
  26. * see board-bock.c for checking detail of dip-switch
  27. */
  28. static const struct pinctrl_map bockw_pinctrl_map[] = {
  29. /* SCIF0 */
  30. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
  31. "scif0_data_a", "scif0"),
  32. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778",
  33. "scif0_ctrl", "scif0"),
  34. };
  35. static void __init bockw_init(void)
  36. {
  37. r8a7778_clock_init();
  38. pinctrl_register_mappings(bockw_pinctrl_map,
  39. ARRAY_SIZE(bockw_pinctrl_map));
  40. r8a7778_pinmux_init();
  41. r8a7778_add_dt_devices();
  42. of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
  43. }
  44. static const char *bockw_boards_compat_dt[] __initdata = {
  45. "renesas,bockw-reference",
  46. NULL,
  47. };
  48. DT_MACHINE_START(BOCKW_DT, "bockw")
  49. .init_early = r8a7778_init_delay,
  50. .init_irq = r8a7778_init_irq_dt,
  51. .init_machine = bockw_init,
  52. .dt_compat = bockw_boards_compat_dt,
  53. MACHINE_END