diff options
author | Alexander Motin <mav@FreeBSD.org> | 2016-04-14 12:50:27 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2016-04-14 12:50:27 +0000 |
commit | 4f6dd82a2f6edad76b474ad266640c2867c9db69 (patch) | |
tree | 68f8806cc8d7474ce3a29562b4715a18db97412c /sys/dev/wbwd/wbwd.c | |
parent | 45be165f23108a8c0c5621c59ec1f23d6f9e8d35 (diff) | |
download | src-4f6dd82a2f6edad76b474ad266640c2867c9db69.tar.gz src-4f6dd82a2f6edad76b474ad266640c2867c9db69.zip |
Remove watchdog timer stop check.
There are bunch of reports that this check fails at least on Nuvoton
NCT6776 chips. I don't see why this check needed there, and Linux does
not have it either. So far this check only made watchdogd unstopable.
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=297963
Diffstat (limited to 'sys/dev/wbwd/wbwd.c')
-rw-r--r-- | sys/dev/wbwd/wbwd.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c index 53e90848def3..75fbea4a5933 100644 --- a/sys/dev/wbwd/wbwd.c +++ b/sys/dev/wbwd/wbwd.c @@ -505,19 +505,10 @@ wb_set_watchdog(struct wb_softc *sc, unsigned int timeout) /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog) */ write_reg(sc, WB_LDN_REG, WB_LDN_REG_LDN8); - /* Disable and validate or arm/reset watchdog. */ if (timeout == 0) { /* Disable watchdog. */ - write_reg(sc, sc->time_reg, 0x00); - sc->reg_timeout = read_reg(sc, sc->time_reg); - (*sc->ext_cfg_exit_f)(sc, 0); - - /* Re-check. */ - if (sc->reg_timeout != 0x00) { - device_printf(sc->dev, "Failed to disable watchdog: " - "0x%02x.\n", sc->reg_timeout); - return (EIO); - } + sc->reg_timeout = 0; + write_reg(sc, sc->time_reg, sc->reg_timeout); } else { /* Read current scaling factor. */ @@ -547,12 +538,12 @@ wb_set_watchdog(struct wb_softc *sc, unsigned int timeout) /* Set timer and arm/reset the watchdog. */ write_reg(sc, sc->time_reg, sc->reg_timeout); - (*sc->ext_cfg_exit_f)(sc, 0); } + (*sc->ext_cfg_exit_f)(sc, 0); + if (sc->debug_verbose) wb_print_state(sc, "After watchdog counter (re)load"); - return (0); } |