Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7be3328 authored by Samuel Tardieu's avatar Samuel Tardieu Committed by Wim Van Sebroeck
Browse files

[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: default avatarSamuel Tardieu <sam@rfc1149.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent de710d68
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -69,11 +69,17 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
#define W83697HF_EFIR (wdt_io+0)	/* Extended Function Index Register (same as EFER) */
#define W83697HF_EFDR (wdt_io+1)	/* Extended Function Data Register */

static void
w83697hf_select_wd_register(void)
static inline void
w83697hf_unlock(void)
{
	outb_p(0x87, W83697HF_EFER);	/* Enter extended function mode */
	outb_p(0x87, W83697HF_EFER);	/* Again according to manual */
}

static void
w83697hf_select_wd_register(void)
{
	w83697hf_unlock();

	outb_p(0x29, W83697HF_EFER);	/* select CR29 */
	outb_p(0x20, W83697HF_EFDR);	/* select WDTO */