Skip to contentSkip to conversation

Fix sibyte watchdog initialization

PATCH New Guenter Roeck 1 participant 1 message Apr 14, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix sibyte watchdog initialization

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.

---
 drivers/watchdog/sb_wdog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/watchdog/sb_wdog.c +2 -2
index 9748eed..1407cfa 100644
@@ -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);
 }
 
Signature · 1 line
1.7.0.87.g0901d