Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/marvell When disabling watchdog timer, do not s...



details:   https://anonhg.NetBSD.org/src/rev/9b87b34cbd69
branches:  trunk
changeset: 780393:9b87b34cbd69
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Jul 22 16:52:51 2012 +0000

description:
When disabling watchdog timer, do not set the counter to 0.
Having the watchdog counter at 0 and having WDRstOutEn set to 1 causes
immediate watchdog reset on my 88F5182 A2.

diffstat:

 sys/arch/arm/marvell/mvsoctmr.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 0c53c037503a -r 9b87b34cbd69 sys/arch/arm/marvell/mvsoctmr.c
--- a/sys/arch/arm/marvell/mvsoctmr.c   Sun Jul 22 16:40:40 2012 +0000
+++ b/sys/arch/arm/marvell/mvsoctmr.c   Sun Jul 22 16:52:51 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsoctmr.c,v 1.4 2012/06/19 16:50:44 hans Exp $        */
+/*     $NetBSD: mvsoctmr.c,v 1.5 2012/07/22 16:52:51 jakllsch Exp $    */
 /*
  * Copyright (c) 2007, 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.4 2012/06/19 16:50:44 hans Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsoctmr.c,v 1.5 2012/07/22 16:52:51 jakllsch Exp $");
 
 #include "opt_ddb.h"
 
@@ -146,7 +146,7 @@
        /*
         * stop watchdog timer, enable watchdog timer resets
         */
-       mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0, 0, 0);
+       mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0xffffffff, 0, 0);
        rstoutn = read_mlmbreg(MVSOC_MLMB_RSTOUTNMASKR);
        write_mlmbreg(MVSOC_MLMB_RSTOUTNMASKR,
                      rstoutn | MVSOC_MLMB_RSTOUTNMASKR_WDRSTOUTEN);
@@ -313,7 +313,7 @@
 
        if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) {
                sc->sc_wdog_armed = 0;
-               mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0, 0, 0);
+               mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0xffffffff, 0, 0);
        } else {
                sc->sc_wdog_armed = 1;
                if (smw->smw_period == WDOG_PERIOD_DEFAULT)
@@ -349,7 +349,7 @@
 
        if (sc->sc_wdog_armed) {
                if (enter)
-                       mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0, 0, 0);
+                       mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG, 0xffffffff, 0, 0);
                else
                        mvsoctmr_cntl(sc, MVSOCTMR_WATCHDOG,
                                      sc->sc_wdog_period, 1, 0);



Home | Main Index | Thread Index | Old Index