setup-r7s72100.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * r7s72100 processor support
  3. *
  4. * Copyright (C) 2013 Renesas Solutions Corp.
  5. * Copyright (C) 2013 Magnus Damm
  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/irq.h>
  21. #include <linux/kernel.h>
  22. #include <linux/of_platform.h>
  23. #include <linux/sh_timer.h>
  24. #include <mach/common.h>
  25. #include <mach/irqs.h>
  26. #include <mach/r7s72100.h>
  27. #include <asm/mach/arch.h>
  28. static struct resource mtu2_resources[] __initdata = {
  29. DEFINE_RES_MEM(0xfcff0000, 0x400),
  30. DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
  31. };
  32. #define r7s72100_register_mtu2() \
  33. platform_device_register_resndata(&platform_bus, "sh-mtu2", \
  34. -1, mtu2_resources, \
  35. ARRAY_SIZE(mtu2_resources), \
  36. NULL, 0)
  37. void __init r7s72100_add_dt_devices(void)
  38. {
  39. r7s72100_register_mtu2();
  40. }
  41. void __init r7s72100_init_early(void)
  42. {
  43. shmobile_setup_delay(400, 1, 3); /* Cortex-A9 @ 400MHz */
  44. }
  45. #ifdef CONFIG_USE_OF
  46. static const char *r7s72100_boards_compat_dt[] __initdata = {
  47. "renesas,r7s72100",
  48. NULL,
  49. };
  50. DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)")
  51. .init_early = r7s72100_init_early,
  52. .dt_compat = r7s72100_boards_compat_dt,
  53. MACHINE_END
  54. #endif /* CONFIG_USE_OF */