diff options
author | Timo Juhani Lindfors <timo.lindfors@iki.fi> | 2010-09-30 10:08:04 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-10-28 17:42:32 -0400 |
commit | a422088db21333ba02a0f4fe4f5abfb08c802d35 (patch) | |
tree | 8ace538437914668ab3060c275cb3d7a0c5de61a /drivers/watchdog | |
parent | f0fc10745a48c766ea5d6d83a6a371a223986bb0 (diff) |
watchdog: it8712f_wdt: Add module parameter for alternative reset sources
On iEi PCISA-9652-R10 (BIOS version 1.5) single board computer reads
from the game port do not seem to reset the watchdog timer. This patch
adds a module parameter wdt_config_reg to specify alternative reset
sources. At least WDT_RESET_KBD has been tested, even just running
while true; do
setleds -L +scroll
sleep 1
setleds -L -scroll
sleep 1
done
is enough to keep the watchdog happy.
Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/it8712f_wdt.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c index b08fae65bb0e..b32c6c045b1a 100644 --- a/drivers/watchdog/it8712f_wdt.c +++ b/drivers/watchdog/it8712f_wdt.c | |||
@@ -85,6 +85,14 @@ static unsigned short address; | |||
85 | #define WDT_OUT_PWROK 0x10 /* Pulse PWROK on timeout */ | 85 | #define WDT_OUT_PWROK 0x10 /* Pulse PWROK on timeout */ |
86 | #define WDT_OUT_KRST 0x40 /* Pulse reset on timeout */ | 86 | #define WDT_OUT_KRST 0x40 /* Pulse reset on timeout */ |
87 | 87 | ||
88 | static int wdt_control_reg = WDT_RESET_GAME; | ||
89 | module_param(wdt_control_reg, int, 0); | ||
90 | MODULE_PARM_DESC(wdt_control_reg, "Value to write to watchdog control " | ||
91 | "register. The default WDT_RESET_GAME resets the timer on " | ||
92 | "game port reads that this driver generates. You can also " | ||
93 | "use KBD, MOUSE or CIR if you have some external way to " | ||
94 | "generate those interrupts."); | ||
95 | |||
88 | static int superio_inb(int reg) | 96 | static int superio_inb(int reg) |
89 | { | 97 | { |
90 | outb(reg, REG); | 98 | outb(reg, REG); |
@@ -131,7 +139,8 @@ static inline void superio_exit(void) | |||
131 | 139 | ||
132 | static inline void it8712f_wdt_ping(void) | 140 | static inline void it8712f_wdt_ping(void) |
133 | { | 141 | { |
134 | inb(address); | 142 | if (wdt_control_reg & WDT_RESET_GAME) |
143 | inb(address); | ||
135 | } | 144 | } |
136 | 145 | ||
137 | static void it8712f_wdt_update_margin(void) | 146 | static void it8712f_wdt_update_margin(void) |
@@ -170,7 +179,7 @@ static void it8712f_wdt_enable(void) | |||
170 | superio_enter(); | 179 | superio_enter(); |
171 | superio_select(LDN_GPIO); | 180 | superio_select(LDN_GPIO); |
172 | 181 | ||
173 | superio_outb(WDT_RESET_GAME, WDT_CONTROL); | 182 | superio_outb(wdt_control_reg, WDT_CONTROL); |
174 | 183 | ||
175 | it8712f_wdt_update_margin(); | 184 | it8712f_wdt_update_margin(); |
176 | 185 | ||