arm, at91, wdt: make timeout configurable
authorHeiko Schocher <hs@denx.de>
Wed, 21 Jan 2015 07:38:22 +0000 (08:38 +0100)
committerAndreas Bießmann <andreas.devel@googlemail.com>
Sat, 7 Feb 2015 22:43:20 +0000 (23:43 +0100)
make the HW WDT timeout configurable through the define
CONFIG_AT91_HW_WDT_TIMEOUT.

Signed-off-by: Heiko Schocher <hs@denx.de>
README
drivers/watchdog/at91sam9_wdt.c

diff --git a/README b/README
index a28ff133ee057c17af79a397e44325328f82dedf..ba57dc5617a3823ca8345b5f5751035a046cbcc5 100644 (file)
--- a/README
+++ b/README
@@ -1257,6 +1257,9 @@ The following options need to be configured:
                SoC, then define this variable and provide board
                specific code for the "hw_watchdog_reset" function.
 
+               CONFIG_AT91_HW_WDT_TIMEOUT
+               specify the timeout in seconds. default 2 seconds.
+
 - U-Boot Version:
                CONFIG_VERSION_VARIABLE
                If this variable is defined, an environment variable
index ffd49a2befbb24a59747533c5960741a0ae14f05..03c786c53bd0db59b66aed4e0a6d4ecdde0bd2f2 100644 (file)
 #define ticks_to_ms(t) (((t + 1) * 1000) >> 8)
 
 /* Hardware timeout in seconds */
+#if !defined(CONFIG_AT91_HW_WDT_TIMEOUT)
 #define WDT_HW_TIMEOUT 2
+#else
+#define WDT_HW_TIMEOUT CONFIG_AT91_HW_WDT_TIMEOUT
+#endif
 
 /*
  * Set the watchdog time interval in 1/256Hz (write-once)