Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40224
b: refs/heads/master
c: ab9d441
h: refs/heads/master
v: v3
  • Loading branch information
Wim Van Sebroeck committed Oct 4, 2006
1 parent 4fbd5fd commit 22e99de
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0845bf4e1df07e16fa39d96508a1ba4a480ce3e
refs/heads/master: ab9d441425559aa035ba6327f21e8922e8a13927
8 changes: 8 additions & 0 deletions trunk/drivers/char/watchdog/w83627hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/spinlock.h>

#include <asm/io.h>
#include <asm/uaccess.h>
Expand All @@ -44,6 +45,7 @@

static unsigned long wdt_is_open;
static char expect_close;
static spinlock_t io_lock;

/* You must set this - there is no sane way to probe for this board. */
static int wdt_io = 0x2E;
Expand Down Expand Up @@ -110,12 +112,16 @@ w83627hf_init(void)
static void
wdt_ctrl(int timeout)
{
spin_lock(&io_lock);

w83627hf_select_wd_register();

outb_p(0xF6, WDT_EFER); /* Select CRF6 */
outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF6 */

w83627hf_unselect_wd_register();

spin_unlock(&io_lock);
}

static int
Expand Down Expand Up @@ -303,6 +309,8 @@ wdt_init(void)
{
int ret;

spin_lock_init(&io_lock);

printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF Super I/O chip initialising.\n");

if (wdt_set_heartbeat(timeout)) {
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/char/watchdog/w83697hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/spinlock.h>

#include <asm/io.h>
#include <asm/uaccess.h>
Expand All @@ -44,6 +45,7 @@

static unsigned long wdt_is_open;
static char expect_close;
static spinlock_t io_lock;

/* You must set this - there is no sane way to probe for this board. */
static int wdt_io = 0x2E;
Expand Down Expand Up @@ -114,12 +116,16 @@ w83697hf_init(void)
static void
wdt_ctrl(int timeout)
{
spin_lock(&io_lock);

w83697hf_select_wd_register();

outb_p(0xF4, WDT_EFER); /* Select CRF4 */
outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF4 */

w83697hf_unselect_wd_register();

spin_unlock(&io_lock);
}

static int
Expand Down Expand Up @@ -307,6 +313,8 @@ wdt_init(void)
{
int ret;

spin_lock_init(&io_lock);

printk(KERN_INFO "WDT driver for the Winbond(TM) W83697HF Super I/O chip initialising.\n");

if (wdt_set_heartbeat(timeout)) {
Expand Down

0 comments on commit 22e99de

Please sign in to comment.