提交 86913315 编写于 作者: G Guenter Roeck 提交者: Wim Van Sebroeck

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: NGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: NRalf Baechle <ralf@linux-mips.org>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 b91ce4d1
...@@ -67,8 +67,8 @@ static DEFINE_SPINLOCK(sbwd_lock); ...@@ -67,8 +67,8 @@ static DEFINE_SPINLOCK(sbwd_lock);
void sbwdog_set(char __iomem *wdog, unsigned long t) void sbwdog_set(char __iomem *wdog, unsigned long t)
{ {
spin_lock(&sbwd_lock); spin_lock(&sbwd_lock);
__raw_writeb(0, wdog - 0x10); __raw_writeb(0, wdog);
__raw_writeq(t & 0x7fffffUL, wdog); __raw_writeq(t & 0x7fffffUL, wdog - 0x10);
spin_unlock(&sbwd_lock); spin_unlock(&sbwd_lock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册