Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118685
b: refs/heads/master
c: 0a0e9e0
h: refs/heads/master
i:
  118683: 926ed00
v: v3
  • Loading branch information
Matthias Fuchs authored and Kumar Gala committed Nov 8, 2008
1 parent a84f6df commit 13d669d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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: b41d6fee37e2bebd58ad3623c288197e75787905
refs/heads/master: 0a0e9e0cb90170f95b4351597fd5c0e65fab6bc5
5 changes: 4 additions & 1 deletion trunk/drivers/watchdog/booke_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT;

#ifdef CONFIG_FSL_BOOKE
#define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15))
#define WDTP_MASK (WDTP(0))
#else
#define WDTP(x) (TCR_WP(x))
#define WDTP_MASK (TCR_WP_MASK)
#endif

static DEFINE_SPINLOCK(booke_wdt_lock);
Expand All @@ -65,6 +67,7 @@ static void __booke_wdt_enable(void *data)
/* clear status before enabling watchdog */
__booke_wdt_ping(NULL);
val = mfspr(SPRN_TCR);
val &= ~WDTP_MASK;
val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period));

mtspr(SPRN_TCR, val);
Expand Down Expand Up @@ -114,7 +117,7 @@ static long booke_wdt_ioctl(struct file *file,
case WDIOC_SETTIMEOUT:
if (get_user(booke_wdt_period, p))
return -EFAULT;
mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP(0)) |
mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP_MASK) |
WDTP(booke_wdt_period));
return 0;
case WDIOC_GETTIMEOUT:
Expand Down

0 comments on commit 13d669d

Please sign in to comment.