diff options
author | Andrew Lunn <andrew@lunn.ch> | 2011-05-15 07:32:42 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-16 14:53:06 -0400 |
commit | f6eaccb30fb4381da05e1e04f7fb9b956ab22826 (patch) | |
tree | 208945cced51e7e00cdf4560da9cdc071120ea9d /arch | |
parent | 28a2b45054f2e3f3671e36a6e9efc82756afa31a (diff) |
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')
-rw-r--r-- | arch/arm/mach-dove/common.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-orion/common.c | 18 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 3 |
4 files changed, 23 insertions, 19 deletions
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index fffa92e92d6..8a414cb71a2 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -205,20 +205,9 @@ void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
205 | /***************************************************************************** | 205 | /***************************************************************************** |
206 | * SoC RTC | 206 | * SoC RTC |
207 | ****************************************************************************/ | 207 | ****************************************************************************/ |
208 | static struct resource dove_rtc_resource[] = { | ||
209 | { | ||
210 | .start = DOVE_RTC_PHYS_BASE, | ||
211 | .end = DOVE_RTC_PHYS_BASE + 32 - 1, | ||
212 | .flags = IORESOURCE_MEM, | ||
213 | }, { | ||
214 | .start = IRQ_DOVE_RTC, | ||
215 | .flags = IORESOURCE_IRQ, | ||
216 | } | ||
217 | }; | ||
218 | |||
219 | void __init dove_rtc_init(void) | 208 | void __init dove_rtc_init(void) |
220 | { | 209 | { |
221 | platform_device_register_simple("rtc-mv", -1, dove_rtc_resource, 2); | 210 | orion_rtc_init(DOVE_RTC_PHYS_BASE, IRQ_DOVE_RTC); |
222 | } | 211 | } |
223 | 212 | ||
224 | /***************************************************************************** | 213 | /***************************************************************************** |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 8cdf9f9f74b..b77050e96ab 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -326,15 +326,9 @@ void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, | |||
326 | /***************************************************************************** | 326 | /***************************************************************************** |
327 | * SoC RTC | 327 | * SoC RTC |
328 | ****************************************************************************/ | 328 | ****************************************************************************/ |
329 | static struct resource kirkwood_rtc_resource = { | ||
330 | .start = RTC_PHYS_BASE, | ||
331 | .end = RTC_PHYS_BASE + SZ_16 - 1, | ||
332 | .flags = IORESOURCE_MEM, | ||
333 | }; | ||
334 | |||
335 | static void __init kirkwood_rtc_init(void) | 329 | static void __init kirkwood_rtc_init(void) |
336 | { | 330 | { |
337 | platform_device_register_simple("rtc-mv", -1, &kirkwood_rtc_resource, 1); | 331 | orion_rtc_init(RTC_PHYS_BASE, NO_IRQ); |
338 | } | 332 | } |
339 | 333 | ||
340 | 334 | ||
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 4eac532ae8a..d0655912383 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, | |||
169 | uart_complete(&orion_uart3, orion_uart3_data, orion_uart3_resources, | 169 | uart_complete(&orion_uart3, orion_uart3_data, orion_uart3_resources, |
170 | membase, mapbase, irq, uartclk); | 170 | membase, mapbase, irq, uartclk); |
171 | } | 171 | } |
172 | |||
173 | /***************************************************************************** | ||
174 | * SoC RTC | ||
175 | ****************************************************************************/ | ||
176 | static struct resource orion_rtc_resource[2]; | ||
177 | |||
178 | void __init orion_rtc_init(unsigned long mapbase, | ||
179 | unsigned long irq) | ||
180 | { | ||
181 | orion_rtc_resource[0].start = mapbase; | ||
182 | orion_rtc_resource[0].end = mapbase + SZ_32 - 1; | ||
183 | orion_rtc_resource[0].flags = IORESOURCE_MEM; | ||
184 | orion_rtc_resource[1].start = irq; | ||
185 | orion_rtc_resource[1].end = irq; | ||
186 | orion_rtc_resource[1].flags = IORESOURCE_IRQ; | ||
187 | |||
188 | platform_device_register_simple("rtc-mv", -1, orion_rtc_resource, 2); | ||
189 | } | ||
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 92ff9916a1d..016b95e87f3 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, | |||
30 | resource_size_t mapbase, | 30 | resource_size_t mapbase, |
31 | unsigned int irq, | 31 | unsigned int irq, |
32 | unsigned int uartclk); | 32 | unsigned int uartclk); |
33 | |||
34 | void __init orion_rtc_init(unsigned long mapbase, | ||
35 | unsigned long irq); | ||
33 | #endif | 36 | #endif |