[PATCH 6/7] at91sam9g45: add wathdog support
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Nov 16 12:55:44 EST 2012
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
arch/arm/mach-at91/at91sam9g45_devices.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 22b455e..38593fc 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -10,6 +10,7 @@
*
*/
#include <common.h>
+#include <init.h>
#include <sizes.h>
#include <asm/armlinux.h>
#include <asm/hardware.h>
@@ -324,3 +325,14 @@ void at91_add_device_spi(int spi_id, struct at91_spi_platform_data *pdata)
#else
void at91_add_device_spi(int spi_id, struct at91_spi_platform_data *pdata) {}
#endif
+
+#ifdef CONFIG_WATCHDOG_AT91SAM9X
+static int at91_add_device_watchdog(void)
+{
+ add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL,
+ AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL);
+
+ return 0;
+}
+coredevice_initcall(at91_add_device_watchdog);
+#endif
--
1.7.10.4
More information about the barebox
mailing list