* 05-Oct-2004 BJD Added semaphore init to stop crashes on open
* Fixed tmr_count / wdt_count confusion
* Added configurable debug
+ *
+ * 11-Jan-2004 BJD Fixed divide-by-2 in timeout code
+ *
+ * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/
#include <linux/module.h>
#include <asm/arch/map.h>
#include <asm/hardware/clock.h>
-#undef S3C2410_VA_WATCHDOG
-#define S3C2410_VA_WATCHDOG (0)
+#undef S3C24XX_VA_WATCHDOG
+#define S3C24XX_VA_WATCHDOG (0)
#include <asm/arch/regs-watchdog.h>
if (timeout < 1)
return -EINVAL;
- /* I think someone must have missed a divide-by-2 in the 2410,
- * as a divisor of 128 gives half the calculated delay...
- */
-
- freq /= 128/2;
+ freq /= 128;
count = timeout * freq;
DBG("%s: count=%d, timeout=%d, freq=%d\n",