Lines Matching full:watchdog
30 * Support for Winbond watchdog.
38 * the watchdog functions and possibly others poking the registers at the same
50 #include <sys/watchdog.h>
66 #define WB_LDN_REG_LDN8 0x08 /* GPIO 2, Watchdog */
69 * LDN8 (GPIO 2, Watchdog) specific registers and options.
75 /* CRF5: Watchdog scale, P20. Mapped to reg_1. */
81 /* CRF6: Watchdog Timeout (0 == off). Mapped to reg_timeout. */
84 /* CRF7: Watchdog mouse, keyb, force, .. Mapped to reg_2. */
90 #define WB_LDN8_CRF7_IRQS 0x0f /* irq source for watchdog, 2 == SMI */
107 * Special feature to let the watchdog fire at a different
108 * timeout as set by watchdog(4) but still use that API to
237 * Return the watchdog related registers as we last read them. This will
238 * usually not give the current timeout or state on whether the watchdog
252 sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): "); in sysctl_wb_debug()
264 * the registers the same time as the watchdog, this sysctl handler should
282 * Sysctl handlers to force a watchdog timeout or to test the NMI functionality
287 * lot of boards have jumpers to change the action on watchdog timeout or
288 * disable the watchdog completely.
325 /* Force watchdog to fire. */ in sysctl_wb_force_test_nmi()
334 * Print current watchdog state.
348 (sc->reg_2 & WB_LDN8_CRF7_TS) ? "Watchdog fired. " : "", in wb_print_state()
358 * (Re)load the watchdog counter depending on timeout. A timeout of 0 will
359 * disable the watchdog.
379 wb_print_state(sc, "Before watchdog counter (re)load"); in wb_set_watchdog()
382 /* Disable watchdog. */ in wb_set_watchdog()
412 /* Set timer and arm/reset the watchdog. */ in wb_set_watchdog()
417 wb_print_state(sc, "After watchdog counter (re)load"); in wb_set_watchdog()
422 * watchdog(9) EVENTHANDLER function implementation to (re)load the counter
423 * with the given timeout or disable the watchdog.
433 KASSERT(sc != NULL, ("%s: watchdog handler function called without " in wb_watchdog_fn()
438 /* Reset (and arm) watchdog. */ in wb_watchdog_fn()
452 /* Disable watchdog. */ in wb_watchdog_fn()
455 /* Failed to disable watchdog. */ in wb_watchdog_fn()
481 "%s (0x%02x/0x%02x) Watchdog Timer", in wb_probe()
591 /* Read the current watchdog configuration. */ in wb_attach()
596 /* Print current state if bootverbose or watchdog already enabled. */ in wb_attach()
598 wb_print_state(sc, "Before watchdog attach"); in wb_attach()
605 * Clear a previous watchdog timeout event (if still set). in wb_attach()
621 "Timeout in seconds overriding default watchdog timeout"); in wb_attach()
635 sysctl_wb_force_test_nmi, "I", "Enable to force watchdog to fire."); in wb_attach()
637 /* Register watchdog. */ in wb_attach()
642 wb_print_state(sc, "After watchdog attach"); in wb_attach()
654 /* Unregister and stop the watchdog if running. */ in wb_detach()