Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Tue, 13 Apr 2010
 19:29:41 -0600
Received: from mail1.lsil.com (mail1.lsil.com [147.145.40.21])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o3E1Tdk7014680	for
 <andy.sharp@lsi.com>; Tue, 13 Apr 2010 18:29:40 -0700
Received: from psmtp.com (na3sys009amx180.postini.com [74.125.149.161])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id o3E1TIOC024320	for
 <andy.sharp@lsi.com>; Tue, 13 Apr 2010 18:29:37 -0700 (PDT)
Received: from source ([78.24.191.182]) by na3sys009amx180.postini.com
 ([74.125.148.14]) with SMTP;	Tue, 13 Apr 2010 21:29:38 EDT
Received: from localhost.localdomain ([127.0.0.1]:58462 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492575Ab0DNB27 (ORCPT
        <rfc822;andy.sharp@lsi.com>); Wed, 14 Apr 2010 03:28:59 +0200
Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 14 Apr 2010 03:28:41
 +0200 (CEST)
Received: from imr1.ericy.com ([198.24.6.9]:56952 "EHLO imr1.ericy.com"
        rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP        id
 S1492299Ab0DNB2f (ORCPT <rfc822;linux-mips@linux-mips.org>);        Wed, 14
 Apr 2010 03:28:35 +0200
Received: from eusaamw0711.eamcs.ericsson.se ([147.117.20.178])        by
 imr1.ericy.com (8.13.1/8.13.1) with ESMTP id o3E1WfAQ005113;        Tue, 13
 Apr 2010 20:32:46 -0500
Received: from prattle.redback.com (147.117.20.212) by
 eusaamw0711.eamcs.ericsson.se (147.117.20.179) with Microsoft SMTP Server id
 8.1.375.2; Tue, 13 Apr 2010 21:28:21 -0400
Received: from localhost (localhost [127.0.0.1])        by prattle.redback.com
 (Postfix) with ESMTP id 9858AFEFFFE;   Tue, 13 Apr 2010 18:28:21 -0700 (PDT)
Received: from prattle.redback.com ([127.0.0.1]) by localhost (prattle
 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01449-09; Tue, 13 Apr
 2010 18:28:21 -0700 (PDT)
Received: from localhost (rbos-pc-13.lab.redback.com [10.12.11.133])    by
 prattle.redback.com (Postfix) with ESMTP id 87263FEFFFC;       Tue, 13 Apr
 2010 18:28:20 -0700 (PDT)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>
CC: Guenter Roeck <guenter.roeck@ericsson.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Tue, 13 Apr 2010 19:28:16 -0600
Subject: [PATCH] Fix sibyte watchdog initialization
Thread-Topic: [PATCH] Fix sibyte watchdog initialization
Thread-Index: AcrbcfRznxd2gkHYREmm3mN1SN1vJA==
Message-ID: <1271208496-30878-1-git-send-email-guenter.roeck@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <guenter.roeck@ericsson.com> [46/2] 
x-pstn-neptune: 1/1/1.00/82
x-list: linux-mips
x-original-sender: guenter.roeck@ericsson.com
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

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 tim=
e.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
---
 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 9748eed..1407cfa 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);
 }
=20
--=20
1.7.0.87.g0901d


