aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorMarc Zyngier <maz@misterjones.org>2010-04-09 12:43:33 -0400
committerWim Van Sebroeck <wim@iguana.be>2010-04-16 08:26:27 -0400
commitb1183e064a3f95d27351b2d2c811b50bf4d770a4 (patch)
tree92a201265d64d2318ec1a60f166fc472d0380526 /drivers/watchdog
parent0fb06571bbb5c72b4663c20f721323260ea802bf (diff)
[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: Marc Zyngier <maz@misterjones.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/max63xx_wdt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/watchdog/max63xx_wdt.c b/drivers/watchdog/max63xx_wdt.c
index 75f3a83c0361..3053ff05ca41 100644
--- a/drivers/watchdog/max63xx_wdt.c
+++ b/drivers/watchdog/max63xx_wdt.c
@@ -154,9 +154,14 @@ static void max63xx_wdt_enable(struct max63xx_timeout *entry)
154 154
155static void max63xx_wdt_disable(void) 155static void max63xx_wdt_disable(void)
156{ 156{
157 u8 val;
158
157 spin_lock(&io_lock); 159 spin_lock(&io_lock);
158 160
159 __raw_writeb(3, wdt_base); 161 val = __raw_readb(wdt_base);
162 val &= ~MAX6369_WDSET;
163 val |= 3;
164 __raw_writeb(val, wdt_base);
160 165
161 spin_unlock(&io_lock); 166 spin_unlock(&io_lock);
162 167