diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-11-01 13:43:31 -0400 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-11-28 09:50:39 -0500 |
commit | c1c30a29df7e47310caa979dc48f715ae478de5f (patch) | |
tree | bea09972cee59473033064e55a649105e86525a7 /arch/arm/mach-at91/at91sam9g45_devices.c | |
parent | f22deee523e0ff49c3be01dd6f979d374230725a (diff) |
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/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index bb2ba0c1d0ee..3b91706e4f7d 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1133,10 +1133,19 @@ static void __init at91_add_device_trng(void) {} | |||
1133 | * -------------------------------------------------------------------- */ | 1133 | * -------------------------------------------------------------------- */ |
1134 | 1134 | ||
1135 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | 1135 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
1136 | static struct resource wdt_resources[] = { | ||
1137 | { | ||
1138 | .start = AT91SAM9G45_BASE_WDT, | ||
1139 | .end = AT91SAM9G45_BASE_WDT + SZ_16 - 1, | ||
1140 | .flags = IORESOURCE_MEM, | ||
1141 | } | ||
1142 | }; | ||
1143 | |||
1136 | static struct platform_device at91sam9g45_wdt_device = { | 1144 | static struct platform_device at91sam9g45_wdt_device = { |
1137 | .name = "at91_wdt", | 1145 | .name = "at91_wdt", |
1138 | .id = -1, | 1146 | .id = -1, |
1139 | .num_resources = 0, | 1147 | .resource = wdt_resources, |
1148 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
1140 | }; | 1149 | }; |
1141 | 1150 | ||
1142 | static void __init at91_add_device_watchdog(void) | 1151 | static void __init at91_add_device_watchdog(void) |