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>
此提交包含在:
@@ -232,3 +232,30 @@ static int __init omap1_init_devices(void)
|
||||
}
|
||||
arch_initcall(omap1_init_devices);
|
||||
|
||||
#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
|
||||
|
||||
static struct resource wdt_resources[] = {
|
||||
{
|
||||
.start = 0xfffeb000,
|
||||
.end = 0xfffeb07F,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device omap_wdt_device = {
|
||||
.name = "omap_wdt",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(wdt_resources),
|
||||
.resource = wdt_resources,
|
||||
};
|
||||
|
||||
static int __init omap_init_wdt(void)
|
||||
{
|
||||
if (!cpu_is_omap16xx())
|
||||
return;
|
||||
|
||||
platform_device_register(&omap_wdt_device);
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(omap_init_wdt);
|
||||
#endif
|
||||
|
新增問題並參考
封鎖使用者