[WATCHDOG] w83697hf/hg WDT driver - patch 12
This is patch 12 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_write_timeout() to set the watchdog's timeout value. Signed-off-by: Samuel Tardieu <sam@rfc1149.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
Родитель
a7933e05d4
Коммит
d46ab596e2
|
@ -83,8 +83,8 @@ w83697hf_lock(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The two functions w83697hf_get_reg() and w83697hf_set_reg()
|
* The three functions w83697hf_get_reg(), w83697hf_set_reg() and
|
||||||
* must be called with the device unlocked.
|
* w83697hf_write_timeout() must be called with the device unlocked.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned char
|
static unsigned char
|
||||||
|
@ -101,6 +101,12 @@ w83697hf_set_reg(unsigned char reg, unsigned char data)
|
||||||
outb_p(data, W83697HF_EFDR);
|
outb_p(data, W83697HF_EFDR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
w83697hf_write_timeout(int timeout)
|
||||||
|
{
|
||||||
|
w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
w83697hf_select_wdt(void)
|
w83697hf_select_wdt(void)
|
||||||
{
|
{
|
||||||
|
@ -157,7 +163,7 @@ wdt_ctrl(int timeout)
|
||||||
|
|
||||||
w83697hf_select_wdt();
|
w83697hf_select_wdt();
|
||||||
|
|
||||||
w83697hf_set_reg(0xF4, timeout); /* Write Timeout counter to CRF4 */
|
w83697hf_write_timeout(timeout);
|
||||||
|
|
||||||
w83697hf_deselect_wdt();
|
w83697hf_deselect_wdt();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче