From a9305f86d54bc9928f47f58365f7d82ba11954a5 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Tue, 20 Jan 2009 23:07:41 +0900 Subject: [PATCH] --- yaml --- r: 130560 b: refs/heads/master c: 65655b5a94f6fc7e6450e3e07f2687c523c71c08 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/include/asm/txx9/tx4939.h | 1 + trunk/arch/mips/txx9/generic/setup_tx4939.c | 22 +++++++++++++++++++++ trunk/arch/mips/txx9/rbtx4939/setup.c | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2dd8be6acda0..324a02166d2e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 42fe7ee31ff904b2419f02864938966c8f0b6edc +refs/heads/master: 65655b5a94f6fc7e6450e3e07f2687c523c71c08 diff --git a/trunk/arch/mips/include/asm/txx9/tx4939.h b/trunk/arch/mips/include/asm/txx9/tx4939.h index 88badb423010..964ef7ede268 100644 --- a/trunk/arch/mips/include/asm/txx9/tx4939.h +++ b/trunk/arch/mips/include/asm/txx9/tx4939.h @@ -541,5 +541,6 @@ void tx4939_irq_init(void); int tx4939_irq(void); void tx4939_mtd_init(int ch); void tx4939_ata_init(void); +void tx4939_rtc_init(void); #endif /* __ASM_TXX9_TX4939_H */ diff --git a/trunk/arch/mips/txx9/generic/setup_tx4939.c b/trunk/arch/mips/txx9/generic/setup_tx4939.c index 6c0049a5bbc1..55440967b3a8 100644 --- a/trunk/arch/mips/txx9/generic/setup_tx4939.c +++ b/trunk/arch/mips/txx9/generic/setup_tx4939.c @@ -435,6 +435,28 @@ void __init tx4939_ata_init(void) platform_device_register(&ata1_dev); } +void __init tx4939_rtc_init(void) +{ + static struct resource res[] = { + { + .start = TX4939_RTC_REG & 0xfffffffffULL, + .end = (TX4939_RTC_REG & 0xfffffffffULL) + 0x100 - 1, + .flags = IORESOURCE_MEM, + }, { + .start = TXX9_IRQ_BASE + TX4939_IR_RTC, + .flags = IORESOURCE_IRQ, + }, + }; + static struct platform_device rtc_dev = { + .name = "tx4939rtc", + .id = -1, + .num_resources = ARRAY_SIZE(res), + .resource = res, + }; + + platform_device_register(&rtc_dev); +} + static void __init tx4939_stop_unused_modules(void) { __u64 pcfg, rst = 0, ckd = 0; diff --git a/trunk/arch/mips/txx9/rbtx4939/setup.c b/trunk/arch/mips/txx9/rbtx4939/setup.c index 98fbd9391bf8..656603b85b71 100644 --- a/trunk/arch/mips/txx9/rbtx4939/setup.c +++ b/trunk/arch/mips/txx9/rbtx4939/setup.c @@ -336,6 +336,7 @@ static void __init rbtx4939_device_init(void) rbtx4939_led_setup(); tx4939_wdt_init(); tx4939_ata_init(); + tx4939_rtc_init(); } static void __init rbtx4939_setup(void)