Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315960
b: refs/heads/master
c: 7732c6b
h: refs/heads/master
v: v3
  • Loading branch information
Wim Van Sebroeck committed Jul 23, 2012
1 parent 38a3384 commit 4d841c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41814eed414ab3cef3d2b857ae3690a2b4888291
refs/heads/master: 7732c6b96f127bb5d9474715149b4e94e369412c
10 changes: 8 additions & 2 deletions trunk/drivers/watchdog/sch311x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -149,18 +151,22 @@ 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);

}

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);

Expand Down

0 comments on commit 4d841c5

Please sign in to comment.