Commit 65655b5a94f6fc7e6450e3e07f2687c523c71c08
Committed by
Ralf Baechle
1 parent
42fe7ee31f
Exists in
master
and in
7 other branches
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>
Showing 3 changed files with 24 additions and 0 deletions Side-by-side Diff
arch/mips/include/asm/txx9/tx4939.h
arch/mips/txx9/generic/setup_tx4939.c
... | ... | @@ -435,6 +435,28 @@ |
435 | 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 | 460 | static void __init tx4939_stop_unused_modules(void) |
439 | 461 | { |
440 | 462 | __u64 pcfg, rst = 0, ckd = 0; |