aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/kernel/cpu
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-08 15:39:25 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-05-08 15:39:25 +0900
commitc2ecb4c4a7da16288062a057b693b7b1e16aaf88 (patch)
tree3c9a339738a9ad6d244a37aab0f42b69e1c39c49 /arch/sh/kernel/cpu
parent4fa48e1774992fd03a4cd83a0f2adecb288c46f8 (diff)
sh: Move out rtc-sh registration from time_64.c to setup-sh5.c
Now that the onchip_remap() mess is sorted out, the rtc-sh support code for SH-5 can follow the same approach as the other CPUs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu')
-rw-r--r--arch/sh/kernel/cpu/sh5/setup-sh5.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c
index d8d59fea108..9a362c8f3fe 100644
--- a/arch/sh/kernel/cpu/sh5/setup-sh5.c
+++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c
@@ -34,8 +34,39 @@ static struct platform_device sci_device = {
},
};
+static struct resource rtc_resources[] = {
+ [0] = {
+ .start = PHYS_PERIPHERAL_BLOCK + 0x01040000,
+ .end = PHYS_PERIPHERAL_BLOCK + 0x01040000 + 0x58 - 1,
+ .flags = IORESOURCE_IO,
+ },
+ [1] = {
+ /* Period IRQ */
+ .start = IRQ_PRI,
+ .flags = IORESOURCE_IRQ,
+ },
+ [2] = {
+ /* Carry IRQ */
+ .start = IRQ_CUI,
+ .flags = IORESOURCE_IRQ,
+ },
+ [3] = {
+ /* Alarm IRQ */
+ .start = IRQ_ATI,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device rtc_device = {
+ .name = "sh-rtc",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(rtc_resources),
+ .resource = rtc_resources,
+};
+
static struct platform_device *sh5_devices[] __initdata = {
&sci_device,
+ &rtc_device,
};
static int __init sh5_devices_setup(void)