diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-12 06:54:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-12 06:54:36 -0400 |
commit | fd5b12458b25a88eb6f6b56464846d98a45e8928 (patch) | |
tree | 916107480879f131b504652af4f74524b2f327b3 /arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |
parent | 9fe5ee0efb1b1d4a0939bc4252a8427e3337d96a (diff) | |
parent | 8be5f1a68f2c14082939dd54e7037dcee2eb54f8 (diff) |
Merge branch 'master' into sh/clkfwk
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7724.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 080f541ae08d..191f0e2a7e08 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -268,8 +268,197 @@ static struct platform_device cmt_device = { | |||
268 | .num_resources = ARRAY_SIZE(cmt_resources), | 268 | .num_resources = ARRAY_SIZE(cmt_resources), |
269 | }; | 269 | }; |
270 | 270 | ||
271 | static struct sh_timer_config tmu0_platform_data = { | ||
272 | .name = "TMU0", | ||
273 | .channel_offset = 0x04, | ||
274 | .timer_bit = 0, | ||
275 | .clk = "tmu0", | ||
276 | .clockevent_rating = 200, | ||
277 | }; | ||
278 | |||
279 | static struct resource tmu0_resources[] = { | ||
280 | [0] = { | ||
281 | .name = "TMU0", | ||
282 | .start = 0xffd80008, | ||
283 | .end = 0xffd80013, | ||
284 | .flags = IORESOURCE_MEM, | ||
285 | }, | ||
286 | [1] = { | ||
287 | .start = 16, | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | static struct platform_device tmu0_device = { | ||
293 | .name = "sh_tmu", | ||
294 | .id = 0, | ||
295 | .dev = { | ||
296 | .platform_data = &tmu0_platform_data, | ||
297 | }, | ||
298 | .resource = tmu0_resources, | ||
299 | .num_resources = ARRAY_SIZE(tmu0_resources), | ||
300 | }; | ||
301 | |||
302 | static struct sh_timer_config tmu1_platform_data = { | ||
303 | .name = "TMU1", | ||
304 | .channel_offset = 0x10, | ||
305 | .timer_bit = 1, | ||
306 | .clk = "tmu0", | ||
307 | .clocksource_rating = 200, | ||
308 | }; | ||
309 | |||
310 | static struct resource tmu1_resources[] = { | ||
311 | [0] = { | ||
312 | .name = "TMU1", | ||
313 | .start = 0xffd80014, | ||
314 | .end = 0xffd8001f, | ||
315 | .flags = IORESOURCE_MEM, | ||
316 | }, | ||
317 | [1] = { | ||
318 | .start = 17, | ||
319 | .flags = IORESOURCE_IRQ, | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static struct platform_device tmu1_device = { | ||
324 | .name = "sh_tmu", | ||
325 | .id = 1, | ||
326 | .dev = { | ||
327 | .platform_data = &tmu1_platform_data, | ||
328 | }, | ||
329 | .resource = tmu1_resources, | ||
330 | .num_resources = ARRAY_SIZE(tmu1_resources), | ||
331 | }; | ||
332 | |||
333 | static struct sh_timer_config tmu2_platform_data = { | ||
334 | .name = "TMU2", | ||
335 | .channel_offset = 0x1c, | ||
336 | .timer_bit = 2, | ||
337 | .clk = "tmu0", | ||
338 | }; | ||
339 | |||
340 | static struct resource tmu2_resources[] = { | ||
341 | [0] = { | ||
342 | .name = "TMU2", | ||
343 | .start = 0xffd80020, | ||
344 | .end = 0xffd8002b, | ||
345 | .flags = IORESOURCE_MEM, | ||
346 | }, | ||
347 | [1] = { | ||
348 | .start = 18, | ||
349 | .flags = IORESOURCE_IRQ, | ||
350 | }, | ||
351 | }; | ||
352 | |||
353 | static struct platform_device tmu2_device = { | ||
354 | .name = "sh_tmu", | ||
355 | .id = 2, | ||
356 | .dev = { | ||
357 | .platform_data = &tmu2_platform_data, | ||
358 | }, | ||
359 | .resource = tmu2_resources, | ||
360 | .num_resources = ARRAY_SIZE(tmu2_resources), | ||
361 | }; | ||
362 | |||
363 | |||
364 | static struct sh_timer_config tmu3_platform_data = { | ||
365 | .name = "TMU3", | ||
366 | .channel_offset = 0x04, | ||
367 | .timer_bit = 0, | ||
368 | .clk = "tmu1", | ||
369 | }; | ||
370 | |||
371 | static struct resource tmu3_resources[] = { | ||
372 | [0] = { | ||
373 | .name = "TMU3", | ||
374 | .start = 0xffd90008, | ||
375 | .end = 0xffd90013, | ||
376 | .flags = IORESOURCE_MEM, | ||
377 | }, | ||
378 | [1] = { | ||
379 | .start = 57, | ||
380 | .flags = IORESOURCE_IRQ, | ||
381 | }, | ||
382 | }; | ||
383 | |||
384 | static struct platform_device tmu3_device = { | ||
385 | .name = "sh_tmu", | ||
386 | .id = 3, | ||
387 | .dev = { | ||
388 | .platform_data = &tmu3_platform_data, | ||
389 | }, | ||
390 | .resource = tmu3_resources, | ||
391 | .num_resources = ARRAY_SIZE(tmu3_resources), | ||
392 | }; | ||
393 | |||
394 | static struct sh_timer_config tmu4_platform_data = { | ||
395 | .name = "TMU4", | ||
396 | .channel_offset = 0x10, | ||
397 | .timer_bit = 1, | ||
398 | .clk = "tmu1", | ||
399 | }; | ||
400 | |||
401 | static struct resource tmu4_resources[] = { | ||
402 | [0] = { | ||
403 | .name = "TMU4", | ||
404 | .start = 0xffd90014, | ||
405 | .end = 0xffd9001f, | ||
406 | .flags = IORESOURCE_MEM, | ||
407 | }, | ||
408 | [1] = { | ||
409 | .start = 58, | ||
410 | .flags = IORESOURCE_IRQ, | ||
411 | }, | ||
412 | }; | ||
413 | |||
414 | static struct platform_device tmu4_device = { | ||
415 | .name = "sh_tmu", | ||
416 | .id = 4, | ||
417 | .dev = { | ||
418 | .platform_data = &tmu4_platform_data, | ||
419 | }, | ||
420 | .resource = tmu4_resources, | ||
421 | .num_resources = ARRAY_SIZE(tmu4_resources), | ||
422 | }; | ||
423 | |||
424 | static struct sh_timer_config tmu5_platform_data = { | ||
425 | .name = "TMU5", | ||
426 | .channel_offset = 0x1c, | ||
427 | .timer_bit = 2, | ||
428 | .clk = "tmu1", | ||
429 | }; | ||
430 | |||
431 | static struct resource tmu5_resources[] = { | ||
432 | [0] = { | ||
433 | .name = "TMU5", | ||
434 | .start = 0xffd90020, | ||
435 | .end = 0xffd9002b, | ||
436 | .flags = IORESOURCE_MEM, | ||
437 | }, | ||
438 | [1] = { | ||
439 | .start = 57, | ||
440 | .flags = IORESOURCE_IRQ, | ||
441 | }, | ||
442 | }; | ||
443 | |||
444 | static struct platform_device tmu5_device = { | ||
445 | .name = "sh_tmu", | ||
446 | .id = 5, | ||
447 | .dev = { | ||
448 | .platform_data = &tmu5_platform_data, | ||
449 | }, | ||
450 | .resource = tmu5_resources, | ||
451 | .num_resources = ARRAY_SIZE(tmu5_resources), | ||
452 | }; | ||
453 | |||
271 | static struct platform_device *sh7724_devices[] __initdata = { | 454 | static struct platform_device *sh7724_devices[] __initdata = { |
272 | &cmt_device, | 455 | &cmt_device, |
456 | &tmu0_device, | ||
457 | &tmu1_device, | ||
458 | &tmu2_device, | ||
459 | &tmu3_device, | ||
460 | &tmu4_device, | ||
461 | &tmu5_device, | ||
273 | &sci_device, | 462 | &sci_device, |
274 | &rtc_device, | 463 | &rtc_device, |
275 | &iic0_device, | 464 | &iic0_device, |
@@ -292,6 +481,12 @@ device_initcall(sh7724_devices_setup); | |||
292 | 481 | ||
293 | static struct platform_device *sh7724_early_devices[] __initdata = { | 482 | static struct platform_device *sh7724_early_devices[] __initdata = { |
294 | &cmt_device, | 483 | &cmt_device, |
484 | &tmu0_device, | ||
485 | &tmu1_device, | ||
486 | &tmu2_device, | ||
487 | &tmu3_device, | ||
488 | &tmu4_device, | ||
489 | &tmu5_device, | ||
295 | }; | 490 | }; |
296 | 491 | ||
297 | void __init plat_early_device_setup(void) | 492 | void __init plat_early_device_setup(void) |