summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-orion
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 13:32:42 +0200
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 14:53:06 -0400
commitf6eaccb30fb4381da05e1e04f7fb9b956ab22826 (patch)
tree208945cced51e7e00cdf4560da9cdc071120ea9d /arch/arm/plat-orion
parent28a2b45054f2e3f3671e36a6e9efc82756afa31a (diff)
downloadop-kernel-dev-f6eaccb30fb4381da05e1e04f7fb9b956ab22826.zip
op-kernel-dev-f6eaccb30fb4381da05e1e04f7fb9b956ab22826.tar.gz
ARM: orion: Consolidate the creation of the RTC platform data.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r--arch/arm/plat-orion/common.c18
-rw-r--r--arch/arm/plat-orion/include/plat/common.h3
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 4eac532..d0655912 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -169,3 +169,21 @@ void __init orion_uart3_init(unsigned int membase,
uart_complete(&orion_uart3, orion_uart3_data, orion_uart3_resources,
membase, mapbase, irq, uartclk);
}
+
+/*****************************************************************************
+ * SoC RTC
+ ****************************************************************************/
+static struct resource orion_rtc_resource[2];
+
+void __init orion_rtc_init(unsigned long mapbase,
+ unsigned long irq)
+{
+ orion_rtc_resource[0].start = mapbase;
+ orion_rtc_resource[0].end = mapbase + SZ_32 - 1;
+ orion_rtc_resource[0].flags = IORESOURCE_MEM;
+ orion_rtc_resource[1].start = irq;
+ orion_rtc_resource[1].end = irq;
+ orion_rtc_resource[1].flags = IORESOURCE_IRQ;
+
+ platform_device_register_simple("rtc-mv", -1, orion_rtc_resource, 2);
+}
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h
index 92ff991..016b95e 100644
--- a/arch/arm/plat-orion/include/plat/common.h
+++ b/arch/arm/plat-orion/include/plat/common.h
@@ -30,4 +30,7 @@ void __init orion_uart3_init(unsigned int membase,
resource_size_t mapbase,
unsigned int irq,
unsigned int uartclk);
+
+void __init orion_rtc_init(unsigned long mapbase,
+ unsigned long irq);
#endif
OpenPOWER on IntegriCloud