From 8981fc4e5c29ea612a7d73df13d19696c66490e4 Mon Sep 17 00:00:00 2001 From: hhb Date: Thu, 1 Aug 2013 18:14:13 +0800 Subject: [PATCH] rk3026: add watch dog platform device --- arch/arm/mach-rk2928/devices.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-rk2928/devices.c b/arch/arm/mach-rk2928/devices.c index 471f38c06a96..78b3c9dacd64 100644 --- a/arch/arm/mach-rk2928/devices.c +++ b/arch/arm/mach-rk2928/devices.c @@ -757,6 +757,28 @@ static void __init rk2928_init_sdmmc(void) #endif } +#ifdef CONFIG_RK29_WATCHDOG +static struct resource resources_wdt[] = { + { + .start = IRQ_WDT, + .end = IRQ_WDT, + .flags = IORESOURCE_IRQ, + }, + { + .start = RK2928_WDT_PHYS, + .end = RK2928_WDT_PHYS + RK2928_WDT_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device device_wdt = { + .name = "rk29-wdt", + .id = 0, + .num_resources = ARRAY_SIZE(resources_wdt), + .resource = resources_wdt, +}; +#endif + static struct resource resource_arm_pmu[] = { { .start = IRQ_ARM_PMU, @@ -849,6 +871,9 @@ static int __init rk2928_init_devices(void) rk2928_init_i2s(); #if defined(CONFIG_HDMI_RK2928) || defined(CONFIG_HDMI_RK616) platform_device_register(&device_hdmi); +#endif +#ifdef CONFIG_RK29_WATCHDOG + platform_device_register(&device_wdt); #endif platform_device_register(&device_arm_pmu); -- 2.34.1