aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-11 12:24:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-11 12:24:31 -0500
commite892873c5d7431324d98dfd3ed1572a2948046be (patch)
tree05d3785c0a4720c63fa7a7d9372ba24904b5049a /drivers
parenteda1be631a1efa3985b408a231ba20e1ecf0a92b (diff)
parentcb8fdc69a2a80e81e1280ec58afd2c3217ac8a7f (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc: Update desktop/server defconfigs powerpc: Fix msr check in compat_sys_swapcontext powerpc: Repair device bindings documentation powerpc: Updated Freescale PPC related defconfigs powerpc: Update QE/CPM2 usb_ctlr structures for USB support powerpc/86xx: Correct SOC bus-frequency in GE Fanuc SBC610 DTS powerpc: Fix Book-E watchdog timer interval setting powerpc/fsl-booke: Fix synchronization bug w/local tlb invalidates
Diffstat (limited to 'drivers')
-rw-r--r--drivers/watchdog/booke_wdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index c3b78a76f173..225398fd5049 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -42,8 +42,10 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT;
42 42
43#ifdef CONFIG_FSL_BOOKE 43#ifdef CONFIG_FSL_BOOKE
44#define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15)) 44#define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15))
45#define WDTP_MASK (WDTP(0))
45#else 46#else
46#define WDTP(x) (TCR_WP(x)) 47#define WDTP(x) (TCR_WP(x))
48#define WDTP_MASK (TCR_WP_MASK)
47#endif 49#endif
48 50
49static DEFINE_SPINLOCK(booke_wdt_lock); 51static DEFINE_SPINLOCK(booke_wdt_lock);
@@ -65,6 +67,7 @@ static void __booke_wdt_enable(void *data)
65 /* clear status before enabling watchdog */ 67 /* clear status before enabling watchdog */
66 __booke_wdt_ping(NULL); 68 __booke_wdt_ping(NULL);
67 val = mfspr(SPRN_TCR); 69 val = mfspr(SPRN_TCR);
70 val &= ~WDTP_MASK;
68 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); 71 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period));
69 72
70 mtspr(SPRN_TCR, val); 73 mtspr(SPRN_TCR, val);
@@ -114,7 +117,7 @@ static long booke_wdt_ioctl(struct file *file,
114 case WDIOC_SETTIMEOUT: 117 case WDIOC_SETTIMEOUT:
115 if (get_user(booke_wdt_period, p)) 118 if (get_user(booke_wdt_period, p))
116 return -EFAULT; 119 return -EFAULT;
117 mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP(0)) | 120 mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP_MASK) |
118 WDTP(booke_wdt_period)); 121 WDTP(booke_wdt_period));
119 return 0; 122 return 0;
120 case WDIOC_GETTIMEOUT: 123 case WDIOC_GETTIMEOUT: