diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-19 19:21:21 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-19 19:21:21 +0200 |
commit | 0b6c404a07e3240b95aa5682fb8fd57c41609d7a (patch) | |
tree | c4d410b0ec7044922b73c39ecfb3fbb620c29282 /drivers/watchdog/sch311x_wdt.c | |
parent | Input: imx_keypad - fix missing clk conversions (diff) | |
parent | Linux 3.6-rc5 (diff) | |
download | linux-0b6c404a07e3240b95aa5682fb8fd57c41609d7a.tar.xz linux-0b6c404a07e3240b95aa5682fb8fd57c41609d7a.zip |
Merge tag 'v3.6-rc5' into for-linus
Sync with mainline so that I can revert an input patch that came in through
another subsystem tree.
Diffstat (limited to 'drivers/watchdog/sch311x_wdt.c')
-rw-r--r-- | drivers/watchdog/sch311x_wdt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/watchdog/sch311x_wdt.c b/drivers/watchdog/sch311x_wdt.c index f8477002b728..9681ada0f252 100644 --- a/drivers/watchdog/sch311x_wdt.c +++ b/drivers/watchdog/sch311x_wdt.c @@ -136,6 +136,8 @@ static void sch311x_wdt_set_timeout(int t) static void sch311x_wdt_start(void) { + unsigned char t; + spin_lock(&sch311x_wdt_data.io_lock); /* set watchdog's timeout */ @@ -149,7 +151,8 @@ static void sch311x_wdt_start(void) * Bit 4-6 (Reserved) * Bit 7, Output Type: 0 = Push Pull Bit, 1 = Open Drain */ - outb(0x0e, sch311x_wdt_data.runtime_reg + GP60); + t = inb(sch311x_wdt_data.runtime_reg + GP60); + outb((t & ~0x0d) | 0x0c, sch311x_wdt_data.runtime_reg + GP60); spin_unlock(&sch311x_wdt_data.io_lock); @@ -157,10 +160,13 @@ static void sch311x_wdt_start(void) static void sch311x_wdt_stop(void) { + unsigned char t; + spin_lock(&sch311x_wdt_data.io_lock); /* stop the watchdog */ - outb(0x01, sch311x_wdt_data.runtime_reg + GP60); + t = inb(sch311x_wdt_data.runtime_reg + GP60); + outb((t & ~0x0d) | 0x01, sch311x_wdt_data.runtime_reg + GP60); /* disable timeout by setting it to 0 */ sch311x_wdt_set_timeout(0); |