From: Guenter Roeck Date: Mon, 19 Apr 2010 15:37:11 +0000 (-0700) Subject: Watchdog: sb_wdog.c: Fix sibyte watchdog initialization X-Git-Tag: upstream/snapshot3+hdmi~14744^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86913315de5ed13debd1566dfea15c4179b1f0c0;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Ralf Baechle Signed-off-by: Wim Van Sebroeck --- 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); }