diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2006-09-07 05:57:00 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-10-04 16:44:33 -0400 |
commit | f7be3328b6e8b09b3a910a93ef569cba162ea81d (patch) | |
tree | f95894ec88ad96c7d1fbde6fa84332f16992e4ec | |
parent | de710d6871c7f569da007f1074710fadf1708c29 (diff) |
[WATCHDOG] w83697hf/hg WDT driver - patch 7
This is patch 7 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.
This patch contains following changes:
- add w83697hf_unlock function to enter the
chipsets extended function mode.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/char/watchdog/w83697hf_wdt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c index ad397f912bd4..b1f225798500 100644 --- a/drivers/char/watchdog/w83697hf_wdt.c +++ b/drivers/char/watchdog/w83697hf_wdt.c | |||
@@ -69,11 +69,17 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON | |||
69 | #define W83697HF_EFIR (wdt_io+0) /* Extended Function Index Register (same as EFER) */ | 69 | #define W83697HF_EFIR (wdt_io+0) /* Extended Function Index Register (same as EFER) */ |
70 | #define W83697HF_EFDR (wdt_io+1) /* Extended Function Data Register */ | 70 | #define W83697HF_EFDR (wdt_io+1) /* Extended Function Data Register */ |
71 | 71 | ||
72 | static void | 72 | static inline void |
73 | w83697hf_select_wd_register(void) | 73 | w83697hf_unlock(void) |
74 | { | 74 | { |
75 | outb_p(0x87, W83697HF_EFER); /* Enter extended function mode */ | 75 | outb_p(0x87, W83697HF_EFER); /* Enter extended function mode */ |
76 | outb_p(0x87, W83697HF_EFER); /* Again according to manual */ | 76 | outb_p(0x87, W83697HF_EFER); /* Again according to manual */ |
77 | } | ||
78 | |||
79 | static void | ||
80 | w83697hf_select_wd_register(void) | ||
81 | { | ||
82 | w83697hf_unlock(); | ||
77 | 83 | ||
78 | outb_p(0x29, W83697HF_EFER); /* select CR29 */ | 84 | outb_p(0x29, W83697HF_EFER); /* select CR29 */ |
79 | outb_p(0x20, W83697HF_EFDR); /* select WDTO */ | 85 | outb_p(0x20, W83697HF_EFDR); /* select WDTO */ |