Watchdog: sb_wdog.c: Fix sibyte watchdog initialization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, April 28, 2010 - 1:59 pm

Gitweb:     http://git.kernel.org/linus/86913315de5ed13debd1566dfea15c4179b1f0c0
Commit:     86913315de5ed13debd1566dfea15c4179b1f0c0
Parent:     b91ce4d14a21fc04d165be30319541e0f9204f15
Author:     Guenter Roeck <guenter.roeck@ericsson.com>
AuthorDate: Mon Apr 19 08:37:11 2010 -0700
Committer:  Wim Van Sebroeck <wim@iguana.be>
CommitDate: Mon Apr 26 18:14:03 2010 +0000

    Watchdog: sb_wdog.c: 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.
    
    Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
    Acked-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
---
 drivers/watchdog/sb_wdog.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sb_wdog.c b/drivers/watchdog/sb_wdog.c
index c8eadd4..88c83aa 100644
--- a/drivers/watchdog/sb_wdog.c
+++ b/drivers/watchdog/sb_wdog.c
@@ -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);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Watchdog: sb_wdog.c: Fix sibyte watchdog initialization, Linux Kernel Mailing ..., (Wed Apr 28, 1:59 pm)