Re: Slight interface change on the watchdog fido

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sun, 10 Dec 2006 23:20:41 -0700 (MST)
In message: <20061210224138.Y1174_at_localhost>
            Nick Hibma <nick_at_van-laarhoven.org> writes:
: >> (*) The i80321_wdog.c cannot be disarmed. Is this correct?
: >> (**) These have been tested to arm, disarm, and fire. Others have only
: >> been compile tested.
: >>
: >> This change has been tested on 6.2-STABLE and 7-CURRENT.
: >
: > FWIW there's another watchdog in xscale/ixp425 for the avila boards.
: 
: Oops, I missed the watchdogs available in CURRENT:
: 
:     imp         at91_st.c
: 
: ./arm/at91/at91_st.c
:     That one doesn't set *error to error on success. See patch below.

I wasn't aware of that requirement...

: ./arm/xscale/ixp425/ixp425_wdog.c
:     Is correct as it is.
: 
: Index: arm/at91/at91_st.c
: ===================================================================
: RCS file: /home/ncvs/src/sys/arm/at91/at91_st.c,v
: retrieving revision 1.5
: diff -u -r1.5 at91_st.c
: --- arm/at91/at91_st.c  9 Aug 2006 20:58:55 -0000       1.5
: +++ arm/at91/at91_st.c  10 Dec 2006 21:47:26 -0000
: _at__at_ -170,10 +170,13 _at__at_
:          uint32_t wdog;
:          int t;
: 
: -       wdog = 0;
:          t = cmd & WD_INTERVAL;
: -       if (cmd != 0 && t >= 22 && t <= 37)
: +       if (cmd != 0 && t >= 22 && t <= 37) {
:                  wdog = (1 << (t - 22)) | ST_WDMR_RSTEN;
: +               *error = 0;
: +       } else {
: +               wdog = 0;
: +       }
:          WR4(ST_WDMR, wdog);
:          WR4(ST_CR, ST_CR_WDRST);
:   }

Go ahead and commit this. I can do it if you'd like.

Warner
Received on Mon Dec 11 2006 - 05:21:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:03 UTC