From 89dced39ab3720bff2396492dcf4b8ebd32a9d96 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 24 Aug 2011 10:31:39 +0200 Subject: [PATCH] --- yaml --- r: 263993 b: refs/heads/master c: 9cfce47b146cb492b8d5e7b40d6f7b3ea1963d50 h: refs/heads/master i: 263991: 7b2be30f4d94675ddc6b1677f2e5ea880df37559 v: v3 --- [refs] | 2 +- trunk/drivers/watchdog/lantiq_wdt.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 47d0139e6b03..6b8de23bbf95 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dbc018eca386b4e2670fc3116feada19f3db664c +refs/heads/master: 9cfce47b146cb492b8d5e7b40d6f7b3ea1963d50 diff --git a/trunk/drivers/watchdog/lantiq_wdt.c b/trunk/drivers/watchdog/lantiq_wdt.c index 7d82adac1cb2..102aed0efbf1 100644 --- a/trunk/drivers/watchdog/lantiq_wdt.c +++ b/trunk/drivers/watchdog/lantiq_wdt.c @@ -51,16 +51,16 @@ static int ltq_wdt_ok_to_close; static void ltq_wdt_enable(void) { - ltq_wdt_timeout = ltq_wdt_timeout * + unsigned long int timeout = ltq_wdt_timeout * (ltq_io_region_clk_rate / LTQ_WDT_DIVIDER) + 0x1000; - if (ltq_wdt_timeout > LTQ_MAX_TIMEOUT) - ltq_wdt_timeout = LTQ_MAX_TIMEOUT; + if (timeout > LTQ_MAX_TIMEOUT) + timeout = LTQ_MAX_TIMEOUT; /* write the first password magic */ ltq_w32(LTQ_WDT_PW1, ltq_wdt_membase + LTQ_WDT_CR); /* write the second magic plus the configuration and new timeout */ ltq_w32(LTQ_WDT_SR_EN | LTQ_WDT_SR_PWD | LTQ_WDT_SR_CLKDIV | - LTQ_WDT_PW2 | ltq_wdt_timeout, ltq_wdt_membase + LTQ_WDT_CR); + LTQ_WDT_PW2 | timeout, ltq_wdt_membase + LTQ_WDT_CR); } static void