Improve the advantech watchdog.

This commit is contained in:
Poul-Henning Kamp 2006-03-06 07:43:28 +00:00
parent 5c27253056
commit 6acae67129
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156335

View File

@ -165,8 +165,12 @@ geode_watchdog(void *foo __unused, u_int cmd, int *error)
static void
advantech_watchdog(void *foo __unused, u_int cmd, int *error)
{
outb(0x0443, (cmd & WD_INTERVAL) ? 1 : 0);
*error = 0;
if (cmd && (cmd & WD_INTERVAL) <= WD_TO_1SEC) {
outb(0x0443, 1);
*error = 0;
} else {
outb(0x0443, 0);
}
}
static int