aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorVaradarajan, Charulatha <charu@ti.com>2010-09-23 10:32:42 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-29 15:21:57 -0400
commitf2ce62312650211f6cf665cd6dc519c334c4071e (patch)
tree37c52a98bf3e19f6658d4ce4fbfaf6fce0cfc85c /arch/arm/mach-omap1
parent92b18d1cf1335a468d4014c4fdb1eb720e77526f (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/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/devices.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index aa0725608fb1..a919366a90dd 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -232,3 +232,30 @@ static int __init omap1_init_devices(void)
232} 232}
233arch_initcall(omap1_init_devices); 233arch_initcall(omap1_init_devices);
234 234
235#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
236
237static struct resource wdt_resources[] = {
238 {
239 .start = 0xfffeb000,
240 .end = 0xfffeb07F,
241 .flags = IORESOURCE_MEM,
242 },
243};
244
245static 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
252static int __init omap_init_wdt(void)
253{
254 if (!cpu_is_omap16xx())
255 return;
256
257 platform_device_register(&omap_wdt_device);
258 return 0;
259}
260subsys_initcall(omap_init_wdt);
261#endif