bf97200308147b647a1e556bd3318ad07e02996e
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / board / telit / evk-pro3 / barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch
1 From 3338bcb05479f1149420d4a0ea3904cb9e42eef5 Mon Sep 17 00:00:00 2001
2 From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
3 Date: Wed, 14 Nov 2012 19:18:22 +0800
4 Subject: [PATCH 3/5] at91sam9260/9g20: add wathdog support
5
6 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
7 ---
8  arch/arm/mach-at91/at91sam9260_devices.c | 12 ++++++++++++
9  1 file changed, 12 insertions(+)
10
11 diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
12 index 1c375ee..5885f91 100644
13 --- a/arch/arm/mach-at91/at91sam9260_devices.c
14 +++ b/arch/arm/mach-at91/at91sam9260_devices.c
15 @@ -10,6 +10,7 @@
16   *
17   */
18  #include <common.h>
19 +#include <init.h>
20  #include <sizes.h>
21  #include <asm/armlinux.h>
22  #include <asm/hardware.h>
23 @@ -397,3 +398,14 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
24  #else
25  void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
26  #endif
27 +
28 +#ifdef CONFIG_WATCHDOG_AT91SAM9X
29 +static int at91_add_device_watchdog(void)
30 +{
31 +       add_generic_device("at91sam9_wdt", DEVICE_ID_SINGLE, NULL,
32 +               AT91_WDT + AT91_BASE_SYS, 16, IORESOURCE_MEM, NULL);
33 +
34 +       return 0;
35 +}
36 +coredevice_initcall(at91_add_device_watchdog);
37 +#endif
38 -- 
39 1.8.1.4
40