diff options
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r7s72100.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r7s72100.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index d4eb509a1c87..55f0b9c7c482 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_timer.h> | ||
25 | #include <mach/common.h> | 26 | #include <mach/common.h> |
26 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
27 | #include <mach/r7s72100.h> | 28 | #include <mach/r7s72100.h> |
@@ -58,6 +59,26 @@ static inline void r7s72100_register_scif(int idx) | |||
58 | sizeof(struct plat_sci_port)); | 59 | sizeof(struct plat_sci_port)); |
59 | } | 60 | } |
60 | 61 | ||
62 | |||
63 | static struct sh_timer_config mtu2_0_platform_data __initdata = { | ||
64 | .name = "MTU2_0", | ||
65 | .timer_bit = 0, | ||
66 | .channel_offset = -0x80, | ||
67 | .clockevent_rating = 200, | ||
68 | }; | ||
69 | |||
70 | static struct resource mtu2_0_resources[] __initdata = { | ||
71 | DEFINE_RES_MEM(0xfcff0300, 0x27), | ||
72 | DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */ | ||
73 | }; | ||
74 | |||
75 | #define r7s72100_register_mtu2(idx) \ | ||
76 | platform_device_register_resndata(&platform_bus, "sh_mtu2", \ | ||
77 | idx, mtu2_##idx##_resources, \ | ||
78 | ARRAY_SIZE(mtu2_##idx##_resources), \ | ||
79 | &mtu2_##idx##_platform_data, \ | ||
80 | sizeof(struct sh_timer_config)) | ||
81 | |||
61 | void __init r7s72100_add_dt_devices(void) | 82 | void __init r7s72100_add_dt_devices(void) |
62 | { | 83 | { |
63 | r7s72100_register_scif(SCIF0); | 84 | r7s72100_register_scif(SCIF0); |
@@ -68,6 +89,7 @@ void __init r7s72100_add_dt_devices(void) | |||
68 | r7s72100_register_scif(SCIF5); | 89 | r7s72100_register_scif(SCIF5); |
69 | r7s72100_register_scif(SCIF6); | 90 | r7s72100_register_scif(SCIF6); |
70 | r7s72100_register_scif(SCIF7); | 91 | r7s72100_register_scif(SCIF7); |
92 | r7s72100_register_mtu2(0); | ||
71 | } | 93 | } |
72 | 94 | ||
73 | void __init r7s72100_init_early(void) | 95 | void __init r7s72100_init_early(void) |