From: Heiko Schocher Date: Wed, 21 Jan 2015 07:38:22 +0000 (+0100) Subject: arm, at91, wdt: make timeout configurable X-Git-Tag: v2015.04-rc2~33^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bae0d6f62723bdfba50ffbd7491ebd282573c0a;hp=2b8b38eacad9bd8dd0e30f324f2aa2b9d717e97a;p=platform%2Fkernel%2Fu-boot.git 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 --- diff --git a/README b/README index a28ff13..ba57dc5 100644 --- 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 diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index ffd49a2..03c786c 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -30,7 +30,11 @@ #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)