diff options
author | Varadarajan, Charulatha <charu@ti.com> | 2010-09-23 10:32:42 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-29 15:21:57 -0400 |
commit | f2ce62312650211f6cf665cd6dc519c334c4071e (patch) | |
tree | 37c52a98bf3e19f6658d4ce4fbfaf6fce0cfc85c /arch/arm/plat-omap | |
parent | 92b18d1cf1335a468d4014c4fdb1eb720e77526f (diff) |
OMAP: WDT: Split OMAP1 and OMAP2PLUS device registration
This patch splits omap_init_wdt() into separate omap_init_wdt()
functions under mach-omap1 and mach-omap2 and set them up with
subsys_initcall.
Also it uses omap_device_build() API instead of
platform_device_register() for watchdog timer device registration
for OMAP2plus chips.
For OMAP2plus chips, the device specific data defined in centralized
hwmod database will be used.
Signed-off-by: Charulatha V <charu@ti.com>
Acked-by: Cousson, Benoit <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index d1920be7833..8e88e0e5d52 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -232,46 +232,6 @@ static void omap_init_uwire(void) | |||
232 | static inline void omap_init_uwire(void) {} | 232 | static inline void omap_init_uwire(void) {} |
233 | #endif | 233 | #endif |
234 | 234 | ||
235 | /*-------------------------------------------------------------------------*/ | ||
236 | |||
237 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | ||
238 | |||
239 | static struct resource wdt_resources[] = { | ||
240 | { | ||
241 | .flags = IORESOURCE_MEM, | ||
242 | }, | ||
243 | }; | ||
244 | |||
245 | static struct platform_device omap_wdt_device = { | ||
246 | .name = "omap_wdt", | ||
247 | .id = -1, | ||
248 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
249 | .resource = wdt_resources, | ||
250 | }; | ||
251 | |||
252 | static void omap_init_wdt(void) | ||
253 | { | ||
254 | if (cpu_is_omap16xx()) | ||
255 | wdt_resources[0].start = 0xfffeb000; | ||
256 | else if (cpu_is_omap2420()) | ||
257 | wdt_resources[0].start = 0x48022000; /* WDT2 */ | ||
258 | else if (cpu_is_omap2430()) | ||
259 | wdt_resources[0].start = 0x49016000; /* WDT2 */ | ||
260 | else if (cpu_is_omap343x()) | ||
261 | wdt_resources[0].start = 0x48314000; /* WDT2 */ | ||
262 | else if (cpu_is_omap44xx()) | ||
263 | wdt_resources[0].start = 0x4a314000; | ||
264 | else | ||
265 | return; | ||
266 | |||
267 | wdt_resources[0].end = wdt_resources[0].start + 0x4f; | ||
268 | |||
269 | (void) platform_device_register(&omap_wdt_device); | ||
270 | } | ||
271 | #else | ||
272 | static inline void omap_init_wdt(void) {} | ||
273 | #endif | ||
274 | |||
275 | /* | 235 | /* |
276 | * This gets called after board-specific INIT_MACHINE, and initializes most | 236 | * This gets called after board-specific INIT_MACHINE, and initializes most |
277 | * on-chip peripherals accessible on this board (except for few like USB): | 237 | * on-chip peripherals accessible on this board (except for few like USB): |
@@ -300,7 +260,6 @@ static int __init omap_init_devices(void) | |||
300 | omap_init_rng(); | 260 | omap_init_rng(); |
301 | omap_init_mcpdm(); | 261 | omap_init_mcpdm(); |
302 | omap_init_uwire(); | 262 | omap_init_uwire(); |
303 | omap_init_wdt(); | ||
304 | return 0; | 263 | return 0; |
305 | } | 264 | } |
306 | arch_initcall(omap_init_devices); | 265 | arch_initcall(omap_init_devices); |