Skip to content

Commit

Permalink
Watchdog: sb_wdog.c: Fix sibyte watchdog initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guenter Roeck authored and Wim Van Sebroeck committed Apr 26, 2010
1 parent b91ce4d commit 8691331
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/watchdog/sb_wdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8691331

Please sign in to comment.