kumquat-buildroot/board/telit/evk-pro3/patches/barebox/0003-at91sam9260-9g20-add-wathdog-support.patch
Fabio Porcedda bafe9bc093 configs/telit_evk_pro3: bump barebox to 2017.01.0
This bump fix the build failure with gcc5 for barebox.

Some changes were made to the first patch to align to the latest
barebox api.

Also done the following changes:
- Use "BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES" instead of patching
  the barebox sources.
- Use "BR2_GLOBAL_PATCH_DIR" instead of
  "BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR".

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-03-06 21:18:05 +01:00

37 lines
1.2 KiB
Diff

From 60110b93a5cbc6ec3d92035d9daf86a30a7fd791 Mon Sep 17 00:00:00 2001
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date: Wed, 14 Nov 2012 19:18:22 +0800
Subject: [PATCH 3/4] at91sam9260/9g20: add wathdog support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
arch/arm/mach-at91/at91sam9260_devices.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 67c4ea860..51852a9a8 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -400,6 +400,17 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data)
void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
#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
+
static int at91_fixup_device(void)
{
at91_rtt_irq_fixup(IOMEM(AT91SAM9260_BASE_RTT));
--
2.12.0