summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh5
diff options
context:
space:
mode:
authorPaul Mundt2009-05-08 08:39:25 +0200
committerPaul Mundt2009-05-08 08:39:25 +0200
commitc2ecb4c4a7da16288062a057b693b7b1e16aaf88 (patch)
tree3c9a339738a9ad6d244a37aab0f42b69e1c39c49 /arch/sh/kernel/cpu/sh5
parentsh: Enable new TMU driver support for all SH-3 and SH-4 CPUs. (diff)
downloadkernel-qcow2-linux-c2ecb4c4a7da16288062a057b693b7b1e16aaf88.tar.gz
kernel-qcow2-linux-c2ecb4c4a7da16288062a057b693b7b1e16aaf88.tar.xz
kernel-qcow2-linux-c2ecb4c4a7da16288062a057b693b7b1e16aaf88.zip
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/sh5')
-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 d8d59fea1082..9a362c8f3fe9 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)