diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-01-20 09:07:41 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-30 16:32:58 -0500 |
commit | 65655b5a94f6fc7e6450e3e07f2687c523c71c08 (patch) | |
tree | 8c910583005dba2f4574340a3e6e79a2b6184d12 /arch/mips/txx9 | |
parent | 42fe7ee31ff904b2419f02864938966c8f0b6edc (diff) |
MIPS: TXx9: Add support for TX4939 internal RTC
Add platform support to use rtc-tx4939 driver.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9')
-rw-r--r-- | arch/mips/txx9/generic/setup_tx4939.c | 22 | ||||
-rw-r--r-- | arch/mips/txx9/rbtx4939/setup.c | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c index 6c0049a5bbc1..55440967b3a8 100644 --- a/arch/mips/txx9/generic/setup_tx4939.c +++ b/arch/mips/txx9/generic/setup_tx4939.c | |||
@@ -435,6 +435,28 @@ void __init tx4939_ata_init(void) | |||
435 | platform_device_register(&ata1_dev); | 435 | platform_device_register(&ata1_dev); |
436 | } | 436 | } |
437 | 437 | ||
438 | void __init tx4939_rtc_init(void) | ||
439 | { | ||
440 | static struct resource res[] = { | ||
441 | { | ||
442 | .start = TX4939_RTC_REG & 0xfffffffffULL, | ||
443 | .end = (TX4939_RTC_REG & 0xfffffffffULL) + 0x100 - 1, | ||
444 | .flags = IORESOURCE_MEM, | ||
445 | }, { | ||
446 | .start = TXX9_IRQ_BASE + TX4939_IR_RTC, | ||
447 | .flags = IORESOURCE_IRQ, | ||
448 | }, | ||
449 | }; | ||
450 | static struct platform_device rtc_dev = { | ||
451 | .name = "tx4939rtc", | ||
452 | .id = -1, | ||
453 | .num_resources = ARRAY_SIZE(res), | ||
454 | .resource = res, | ||
455 | }; | ||
456 | |||
457 | platform_device_register(&rtc_dev); | ||
458 | } | ||
459 | |||
438 | static void __init tx4939_stop_unused_modules(void) | 460 | static void __init tx4939_stop_unused_modules(void) |
439 | { | 461 | { |
440 | __u64 pcfg, rst = 0, ckd = 0; | 462 | __u64 pcfg, rst = 0, ckd = 0; |
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index 98fbd9391bf8..656603b85b71 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c | |||
@@ -336,6 +336,7 @@ static void __init rbtx4939_device_init(void) | |||
336 | rbtx4939_led_setup(); | 336 | rbtx4939_led_setup(); |
337 | tx4939_wdt_init(); | 337 | tx4939_wdt_init(); |
338 | tx4939_ata_init(); | 338 | tx4939_ata_init(); |
339 | tx4939_rtc_init(); | ||
339 | } | 340 | } |
340 | 341 | ||
341 | static void __init rbtx4939_setup(void) | 342 | static void __init rbtx4939_setup(void) |