aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichwd
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ichwd')
-rw-r--r--sys/dev/ichwd/ichwd.c8
-rw-r--r--sys/dev/ichwd/ichwd.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index 75c41b74e31b..42f330d17200 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -512,7 +512,13 @@ ichwd_event(void *arg, unsigned int cmd, int *error)
/* convert from power-of-two-ns to WDT ticks */
cmd &= WD_INTERVAL;
- timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+
+ if (sc->tco_version == 3) {
+ timeout = ((uint64_t)1 << cmd) / ICHWD_TCO_V3_TICK;
+ } else {
+ timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
+ }
+
if (cmd) {
if (!sc->active)
ichwd_tmr_enable(sc);
diff --git a/sys/dev/ichwd/ichwd.h b/sys/dev/ichwd/ichwd.h
index dc24a9d605ce..33ae66c7bc8a 100644
--- a/sys/dev/ichwd/ichwd.h
+++ b/sys/dev/ichwd/ichwd.h
@@ -345,7 +345,9 @@ struct ichwd_softc {
#define TCO_RLD1_TMR_MAX 0x003f
#define TCO_RLD2_TMR_MAX 0x03ff
-/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) */
+/* approximate length in nanoseconds of one WDT tick (about 0.6 sec) for TCO v1/v2 */
#define ICHWD_TICK 600000000
+/* approximate length in nanoseconds of one WDT tick (about 1.0 sec) for TCO v3 */
+#define ICHWD_TCO_V3_TICK 1000000000
#endif