summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/at91cap9_devices.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-11-01 17:43:31 (GMT)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-11-28 14:50:39 (GMT)
commitc1c30a29df7e47310caa979dc48f715ae478de5f (patch)
treebea09972cee59473033064e55a649105e86525a7 /arch/arm/mach-at91/at91cap9_devices.c
parentf22deee523e0ff49c3be01dd6f979d374230725a (diff)
downloadlinux-c1c30a29df7e47310caa979dc48f715ae478de5f.tar.xz
ARM: at91: make watchdog drivers soc independent
switch the watchdog drivers to resource and pass it via platform_device Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'arch/arm/mach-at91/at91cap9_devices.c')
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index 3262a7e..019dac0 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -694,10 +694,19 @@ static void __init at91_add_device_rtt(void)
* -------------------------------------------------------------------- */
#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
+static struct resource wdt_resources[] = {
+ {
+ .start = AT91CAP9_BASE_WDT,
+ .end = AT91CAP9_BASE_WDT + SZ_16 - 1,
+ .flags = IORESOURCE_MEM,
+ }
+};
+
static struct platform_device at91cap9_wdt_device = {
.name = "at91_wdt",
.id = -1,
- .num_resources = 0,
+ .resource = wdt_resources,
+ .num_resources = ARRAY_SIZE(wdt_resources),
};
static void __init at91_add_device_watchdog(void)