aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-sh7372.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-10-14 02:57:25 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-10-15 07:16:45 -0400
commitc6c049ecbccd61fae2e58fe5e2fdd369d87f3716 (patch)
treeca57081f7d3aa9d8d06482345acb4df26b260df8 /arch/arm/mach-shmobile/setup-sh7372.c
parentf1198d1ea1c1fe7a0d619c5cf7049efe6205e527 (diff)
ARM: mach-shmobile: add TMU platform data for sh7372
This patch adds support for the two first channels of the TMU0 timer block on sh7372. One channel is used for clock event, the other for clock source. Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-sh7372.c')
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index ed1324f8f9b7..564a6d0be473 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -185,6 +185,67 @@ static struct platform_device cmt10_device = {
185 .num_resources = ARRAY_SIZE(cmt10_resources), 185 .num_resources = ARRAY_SIZE(cmt10_resources),
186}; 186};
187 187
188/* TMU */
189static struct sh_timer_config tmu00_platform_data = {
190 .name = "TMU00",
191 .channel_offset = 0x4,
192 .timer_bit = 0,
193 .clockevent_rating = 200,
194};
195
196static struct resource tmu00_resources[] = {
197 [0] = {
198 .name = "TMU00",
199 .start = 0xfff60008,
200 .end = 0xfff60013,
201 .flags = IORESOURCE_MEM,
202 },
203 [1] = {
204 .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
205 .flags = IORESOURCE_IRQ,
206 },
207};
208
209static struct platform_device tmu00_device = {
210 .name = "sh_tmu",
211 .id = 0,
212 .dev = {
213 .platform_data = &tmu00_platform_data,
214 },
215 .resource = tmu00_resources,
216 .num_resources = ARRAY_SIZE(tmu00_resources),
217};
218
219static struct sh_timer_config tmu01_platform_data = {
220 .name = "TMU01",
221 .channel_offset = 0x10,
222 .timer_bit = 1,
223 .clocksource_rating = 200,
224};
225
226static struct resource tmu01_resources[] = {
227 [0] = {
228 .name = "TMU01",
229 .start = 0xfff60014,
230 .end = 0xfff6001f,
231 .flags = IORESOURCE_MEM,
232 },
233 [1] = {
234 .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */
235 .flags = IORESOURCE_IRQ,
236 },
237};
238
239static struct platform_device tmu01_device = {
240 .name = "sh_tmu",
241 .id = 1,
242 .dev = {
243 .platform_data = &tmu01_platform_data,
244 },
245 .resource = tmu01_resources,
246 .num_resources = ARRAY_SIZE(tmu01_resources),
247};
248
188/* I2C */ 249/* I2C */
189static struct resource iic0_resources[] = { 250static struct resource iic0_resources[] = {
190 [0] = { 251 [0] = {
@@ -525,6 +586,8 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
525 &scif5_device, 586 &scif5_device,
526 &scif6_device, 587 &scif6_device,
527 &cmt10_device, 588 &cmt10_device,
589 &tmu00_device,
590 &tmu01_device,
528}; 591};
529 592
530static struct platform_device *sh7372_late_devices[] __initdata = { 593static struct platform_device *sh7372_late_devices[] __initdata = {