From 57d0d1c0030143fde852f459c77a4a0eee7596cf Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Mon, 10 Sep 2012 17:38:16 +0200 Subject: kontron_wdt: Enforce timeout value if already set If the watchdog was already engaged, let's rewrite the timeout to insure the proper value is set. --- com32/modules/kontron_wdt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/com32/modules/kontron_wdt.c b/com32/modules/kontron_wdt.c index 6d21d7c2..4e1d2535 100644 --- a/com32/modules/kontron_wdt.c +++ b/com32/modules/kontron_wdt.c @@ -378,6 +378,10 @@ int main(int argc, const char *argv[]) { status = kempld_read8(&pld, KEMPLD_WDT_CFG); /* kick the watchdog if it is already enabled, otherwise start it */ if (status & KEMPLD_WDT_CFG_ENABLE) { + /* Maybye the BIOS did setup a first timer + * in this case, let's enforce the timeout + * to be sure we do have the proper value */ + kempld_wdt_settimeout(&wdt); kempld_wdt_keepalive(&wdt); } else { ret = kempld_wdt_settimeout(&wdt); -- cgit v1.2.1