Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40231
b: refs/heads/master
c: 44d7d32
h: refs/heads/master
i:
  40229: cb81e04
  40227: 9c91ee6
  40223: 4fbd5fd
v: v3
  • Loading branch information
Samuel Tardieu authored and Wim Van Sebroeck committed Oct 4, 2006
1 parent a1bc330 commit d940ae4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb64419e397aaea55b2ef6904e86b6263a80acc7
refs/heads/master: 44d7d3282baa4080b73adca31648e6ef1e191874
42 changes: 21 additions & 21 deletions trunk/drivers/char/watchdog/w83697hf_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,29 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
* Kernel methods.
*/

#define WDT_EFER (wdt_io+0) /* Extended Function Enable Registers */
#define WDT_EFIR (wdt_io+0) /* Extended Function Index Register (same as EFER) */
#define WDT_EFDR (WDT_EFIR+1) /* Extended Function Data Register */
#define W83697HF_EFER (wdt_io+0) /* Extended Function Enable Register */
#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)
{
outb_p(0x87, WDT_EFER); /* Enter extended function mode */
outb_p(0x87, WDT_EFER); /* Again according to manual */
outb_p(0x87, W83697HF_EFER); /* Enter extended function mode */
outb_p(0x87, W83697HF_EFER); /* Again according to manual */

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

outb_p(0x07, WDT_EFER); /* point to logical device number reg */
outb_p(0x08, WDT_EFDR); /* select logical device 8 (GPIO2) */
outb_p(0x30, WDT_EFER); /* select CR30 */
outb_p(0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
outb_p(0x07, W83697HF_EFER); /* point to logical device number reg */
outb_p(0x08, W83697HF_EFDR); /* select logical device 8 (GPIO2) */
outb_p(0x30, W83697HF_EFER); /* select CR30 */
outb_p(0x01, W83697HF_EFDR); /* set bit 0 to activate GPIO2 */
}

static void
w83697hf_unselect_wd_register(void)
{
outb_p(0xAA, WDT_EFER); /* Leave extended function mode */
outb_p(0xAA, W83697HF_EFER); /* Leave extended function mode */
}

static void
Expand All @@ -96,17 +96,17 @@ w83697hf_init(void)

w83697hf_select_wd_register();

outb_p(0xF3, WDT_EFER); /* Select CRF3 */
outb_p(0xF3, W83697HF_EFER); /* Select CRF3 */

t=inb_p(WDT_EFDR); /* read CRF3 */
t=inb_p(W83697HF_EFDR); /* read CRF3 */
if (t != 0) {
printk (KERN_INFO PFX "Watchdog already running. Resetting timeout to %d sec\n", timeout);
outb_p(timeout, WDT_EFDR); /* Write back to CRF3 */
outb_p(timeout, W83697HF_EFDR); /* Write back to CRF3 */
}
outb_p(0xF4, WDT_EFER); /* Select CRF4 */
t=inb_p(WDT_EFDR); /* read CRF4 */
t&=~0x0C; /* set second mode & disable keyboard turning off watchdog */
outb_p(t, WDT_EFDR); /* Write back to CRF4 */
outb_p(0xF4, W83697HF_EFER); /* Select CRF4 */
t=inb_p(W83697HF_EFDR); /* read CRF4 */
t&=~0x0C; /* set second mode & disable keyboard turning off watchdog */
outb_p(t, W83697HF_EFDR); /* Write back to CRF4 */

w83697hf_unselect_wd_register();
}
Expand All @@ -118,8 +118,8 @@ wdt_ctrl(int timeout)

w83697hf_select_wd_register();

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

w83697hf_unselect_wd_register();

Expand Down

0 comments on commit d940ae4

Please sign in to comment.