FreeBSD/sys/arm/at91/at91_wdt.c
/* This routine is called no matter what state the user sets the
 * watchdog mode to. Called at a rate that is slightly less than
 * half the hardware timeout. */
This routine is called no matter what state the user sets the
watchdog mode to. Called at a rate that is slightly less than
half the hardware timeout.
This routine is called no matter what state the user sets the watchdog mode to . Called at a rate that is slightly less than half the hardware timeout .
static void
wdt_tick(void *argp)
{
	struct wdt_softc *sc = argp;
	mtx_assert(&sc->sc_mtx, MA_OWNED);
	if (sc->cmd & (WD_ACTIVE | WD_PASSIVE))
		WR4(sc, WDT_CR, WDT_KEY|WDT_WDRSTT);
	sc->cmd &= WD_PASSIVE;
	callout_reset(&sc->tick_ch, sc->interval, wdt_tick, sc);
}
static void wdt_tick ( void * argp ) { struct wdt_softc * sc = argp ; mtx_assert ( & sc -> sc_mtx , MA_OWNED ) ; if ( sc -> cmd & ( WD_ACTIVE | WD_PASSIVE ) ) WR4 ( sc , WDT_CR , WDT_KEY | WDT_WDRSTT ) ; sc -> cmd &= WD_PASSIVE ; callout_reset ( & sc -> tick_ch , sc -> interval , wdt_tick , sc ) ; }
This routine is called no matter what state the user sets the
 watchdog mode to.
This routine is called no matter what state the user sets the watchdog mode to .