summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/include
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2019-04-03 07:37:40 +0200
committerEugen Hristev <eugen.hristev@microchip.com>2019-04-09 09:28:50 +0300
commit256c2ff0cc6cdc8cf7c225bc6e03b92afae353b4 (patch)
tree2ee19c4cdb862e194900282f1efe0377135895b4 /arch/arm/mach-at91/include
parent05d4b8e4ad9b24a2dace09d86c39b2b4f056f613 (diff)
arm: at91: Enable watchdog support
This patch enables and starts the watchdog on the AT91 platform if configured. The WD timeout value is read in the AT91 WD device driver from the DT, using the "timeout-sec" DT property. If not provided in the DT, the default value of 2 seconds is used. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com>
Diffstat (limited to 'arch/arm/mach-at91/include')
-rw-r--r--arch/arm/mach-at91/include/mach/at91_wdt.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h
index cd2272367b..a8fc73b3d1 100644
--- a/arch/arm/mach-at91/include/mach/at91_wdt.h
+++ b/arch/arm/mach-at91/include/mach/at91_wdt.h
@@ -25,6 +25,12 @@ typedef struct at91_wdt {
u32 sr;
} at91_wdt_t;
+struct at91_wdt_priv {
+ void __iomem *regs;
+ u32 regval;
+ u32 timeout;
+};
+
#endif
/* Watchdog Control Register */
@@ -43,4 +49,8 @@ typedef struct at91_wdt {
#define AT91_WDT_MR_WDDBGHLT 0x10000000
#define AT91_WDT_MR_WDIDLEHLT 0x20000000
+/* Hardware timeout in seconds */
+#define WDT_MAX_TIMEOUT 16
+#define WDT_DEFAULT_TIMEOUT 2
+
#endif