Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1183e06 authored by Marc Zyngier's avatar Marc Zyngier Committed by Wim Van Sebroeck
Browse files

[WATCHDOG] max63xx: be careful when disabling the watchdog



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: default avatarMarc Zyngier <maz@misterjones.org>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 0fb06571
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -154,9 +154,14 @@ static void max63xx_wdt_enable(struct max63xx_timeout *entry)


static void max63xx_wdt_disable(void)
static void max63xx_wdt_disable(void)
{
{
	u8 val;

	spin_lock(&io_lock);
	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);
	spin_unlock(&io_lock);