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/at91sam9260_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/at91sam9260_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 63cbfb887fbf..9cdaffa0d6b1 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -738,10 +738,19 @@ static void __init at91_add_device_rtt(void) | |||
738 | * -------------------------------------------------------------------- */ | 738 | * -------------------------------------------------------------------- */ |
739 | 739 | ||
740 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | 740 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
741 | static struct resource wdt_resources[] = { | ||
742 | { | ||
743 | .start = AT91SAM9260_BASE_WDT, | ||
744 | .end = AT91SAM9260_BASE_WDT + SZ_16 - 1, | ||
745 | .flags = IORESOURCE_MEM, | ||
746 | } | ||
747 | }; | ||
748 | |||
741 | static struct platform_device at91sam9260_wdt_device = { | 749 | static struct platform_device at91sam9260_wdt_device = { |
742 | .name = "at91_wdt", | 750 | .name = "at91_wdt", |
743 | .id = -1, | 751 | .id = -1, |
744 | .num_resources = 0, | 752 | .resource = wdt_resources, |
753 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
745 | }; | 754 | }; |
746 | 755 | ||
747 | static void __init at91_add_device_watchdog(void) | 756 | static void __init at91_add_device_watchdog(void) |