Skip to content

Commit

Permalink
[WATCHDOG] max63xx: be careful when disabling the watchdog
Browse files Browse the repository at this point in the history
When shutting down the watchdog timer, special care must be taken
not to overwrite other bits in the register, as it may be shared
with other peripherals.

For example, on the Arcom Vulcan, the register is shared between
the watchdog and the PCI reset line...

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Marc Zyngier authored and Wim Van Sebroeck committed Apr 16, 2010
1 parent 0fb0657 commit b1183e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/watchdog/max63xx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,14 @@ static void max63xx_wdt_enable(struct max63xx_timeout *entry)

static void max63xx_wdt_disable(void)
{
u8 val;

spin_lock(&io_lock);

__raw_writeb(3, wdt_base);
val = __raw_readb(wdt_base);
val &= ~MAX6369_WDSET;
val |= 3;
__raw_writeb(val, wdt_base);

spin_unlock(&io_lock);

Expand Down

0 comments on commit b1183e0

Please sign in to comment.