Watchdog: sb_wdog.c: Fix sibyte watchdog initialization
authorGuenter Roeck <[email protected]>
Mon, 19 Apr 2010 15:37:11 +0000 (08:37 -0700)
committerWim Van Sebroeck <[email protected]>
Mon, 26 Apr 2010 18:14:03 +0000 (18:14 +0000)
Watchdog configuration register and timer count register were interchanged,
causing wrong values to be written into both registers.
This caused watchdog triggered resets even if the watchdog was reset in time.

Signed-off-by: Guenter Roeck <[email protected]>
Acked-by: Ralf Baechle <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
drivers/watchdog/sb_wdog.c

index c8eadd47817585cdd492f8b9c4b3a944ff2b2880..88c83aa5730318b512d86a7a048dc60a9758de46 100644 (file)
@@ -67,8 +67,8 @@ static DEFINE_SPINLOCK(sbwd_lock);
 void sbwdog_set(char __iomem *wdog, unsigned long t)
 {
        spin_lock(&sbwd_lock);
-       __raw_writeb(0, wdog - 0x10);
-       __raw_writeq(t & 0x7fffffUL, wdog);
+       __raw_writeb(0, wdog);
+       __raw_writeq(t & 0x7fffffUL, wdog - 0x10);
        spin_unlock(&sbwd_lock);
 }