Commit 081a07d5 authored by Ben Dooks's avatar Ben Dooks Committed by Linus Torvalds

[WATCHDOG] s3c2410-divide-patch

The s3c2410 watchdog driver has an incorrect /2
in the timer calculation, fix this problem
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent a9d07907
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
* Fixed tmr_count / wdt_count confusion * Fixed tmr_count / wdt_count confusion
* Added configurable debug * Added configurable debug
* *
* 11-Jan-2004 BJD Fixed divide-by-2 in timeout code
*
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/ */
...@@ -165,11 +167,7 @@ static int s3c2410wdt_set_heartbeat(int timeout) ...@@ -165,11 +167,7 @@ static int s3c2410wdt_set_heartbeat(int timeout)
if (timeout < 1) if (timeout < 1)
return -EINVAL; return -EINVAL;
/* I think someone must have missed a divide-by-2 in the 2410, freq /= 128;
* as a divisor of 128 gives half the calculated delay...
*/
freq /= 128/2;
count = timeout * freq; count = timeout * freq;
DBG("%s: count=%d, timeout=%d, freq=%d\n", DBG("%s: count=%d, timeout=%d, freq=%d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment