setup-r7s72100.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 <asm/mach/arch.h>
  25. #include "common.h"
  26. #include "irqs.h"
  27. #include "r7s72100.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(NULL, "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. #ifdef CONFIG_USE_OF
  42. static const char *r7s72100_boards_compat_dt[] __initdata = {
  43. "renesas,r7s72100",
  44. NULL,
  45. };
  46. DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)")
  47. .init_early = shmobile_init_delay,
  48. .dt_compat = r7s72100_boards_compat_dt,
  49. MACHINE_END
  50. #endif /* CONFIG_USE_OF */