Commit 7bae0d6f62723bdfba50ffbd7491ebd282573c0a
Committed by
Andreas Bießmann
1 parent
2b8b38eaca
Exists in
v2017.01-smarct4x
and in
37 other branches
arm, at91, wdt: make timeout configurable
make the HW WDT timeout configurable through the define CONFIG_AT91_HW_WDT_TIMEOUT. Signed-off-by: Heiko Schocher <hs@denx.de>
Showing 2 changed files with 7 additions and 0 deletions Side-by-side Diff
README
... | ... | @@ -1257,6 +1257,9 @@ |
1257 | 1257 | SoC, then define this variable and provide board |
1258 | 1258 | specific code for the "hw_watchdog_reset" function. |
1259 | 1259 | |
1260 | + CONFIG_AT91_HW_WDT_TIMEOUT | |
1261 | + specify the timeout in seconds. default 2 seconds. | |
1262 | + | |
1260 | 1263 | - U-Boot Version: |
1261 | 1264 | CONFIG_VERSION_VARIABLE |
1262 | 1265 | If this variable is defined, an environment variable |
drivers/watchdog/at91sam9_wdt.c
... | ... | @@ -30,7 +30,11 @@ |
30 | 30 | #define ticks_to_ms(t) (((t + 1) * 1000) >> 8) |
31 | 31 | |
32 | 32 | /* Hardware timeout in seconds */ |
33 | +#if !defined(CONFIG_AT91_HW_WDT_TIMEOUT) | |
33 | 34 | #define WDT_HW_TIMEOUT 2 |
35 | +#else | |
36 | +#define WDT_HW_TIMEOUT CONFIG_AT91_HW_WDT_TIMEOUT | |
37 | +#endif | |
34 | 38 | |
35 | 39 | /* |
36 | 40 | * Set the watchdog time interval in 1/256Hz (write-once) |