Lines Matching +full:timeout +full:- +full:minutes

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
54 uint64_t timeout; in wd_func() local
62 * Convert the requested timeout to seconds. in wd_func()
63 * If the timeout is smaller than the minimal supported value in wd_func()
70 timeout = (uint64_t)1 << (cmd - WD_TO_1SEC); in wd_func()
72 timeout = 1; in wd_func()
74 /* TODO If timeout is greater than maximum value in wd_func()
76 * switch the timer to minutes mode by clearing in wd_func()
82 * XXX The timeout actually can be up to 65535 units in wd_func()
87 if (timeout <= UINT8_MAX) { in wd_func()
88 val = timeout; in wd_func()
99 device_printf(dev, "setting timeout to %d\n", val); in wd_func()
138 /* First, reset the timeout, just in case. */ in itwd_attach()
161 sc->intr_rid = 0; in itwd_attach()
162 bus_set_resource(dev, SYS_RES_IRQ, sc->intr_rid, irq, 1); in itwd_attach()
164 sc->intr_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, in itwd_attach()
165 &sc->intr_rid, RF_ACTIVE); in itwd_attach()
166 if (sc->intr_res == NULL) { in itwd_attach()
170 error = bus_setup_intr(dev, sc->intr_res, in itwd_attach()
172 &sc->intr_handle); in itwd_attach()
175 sc->intr_rid, sc->intr_res); in itwd_attach()
182 device_printf(dev, "Using IRQ%d to signal timeout\n", irq); in itwd_attach()
186 device_printf(dev, "Configured for system reset on timeout\n"); in itwd_attach()
192 sc->wd_ev = EVENTHANDLER_REGISTER(watchdog_list, wd_func, dev, 0); in itwd_attach()
202 if (sc->wd_ev != NULL) in itwd_detach()
203 EVENTHANDLER_DEREGISTER(watchdog_list, sc->wd_ev); in itwd_detach()
205 if (sc->intr_handle) in itwd_detach()
206 bus_teardown_intr(dev, sc->intr_res, sc->intr_handle); in itwd_detach()
207 if (sc->intr_res) in itwd_detach()
208 bus_release_resource(dev, SYS_RES_IRQ, sc->intr_rid, in itwd_detach()
209 sc->intr_res); in itwd_detach()