Skip to content

Commit

Permalink
[WATCHDOG] iTCO_wdt : correct status clearing
Browse files Browse the repository at this point in the history
The iTCO_wdt code was not clearing the correct bits.
It now clears the timeout status bit and then the
SECOND_TO_STS bit and then the BOOT_STS bit.
Note: we should first clear the SECOND_TO_STS bit
before clearing the BOOT_STS bit.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Wim Van Sebroeck committed Nov 21, 2008
1 parent 7cd5b08 commit c6904dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/watchdog/iTCO_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,9 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
TCOBASE);

/* Clear out the (probably old) status */
outb(0, TCO1_STS);
outb(3, TCO2_STS);
outb(8, TCO1_STS); /* Clear the Time Out Status bit */
outb(2, TCO2_STS); /* Clear SECOND_TO_STS bit */
outb(4, TCO2_STS); /* Clear BOOT_STS bit */

/* Make sure the watchdog is not running */
iTCO_wdt_stop();
Expand Down

0 comments on commit c6904dd

Please sign in to comment.