aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorRandy Vinson <rvinson@mvista.com>2010-12-06 14:02:23 -0700
committerWim Van Sebroeck <wim@iguana.be>2011-01-12 10:24:38 +0000
commit6ae98ed186cbe6909105c536c24419e52af8fc66 (patch)
tree2d8d97791e1f8af3766f5599d0151ebf083a6ed7 /drivers/watchdog
parent5d63c13415db2819590bba975dd023eaa593ddc3 (diff)
downloadkernel_samsung_espresso10-6ae98ed186cbe6909105c536c24419e52af8fc66.zip
kernel_samsung_espresso10-6ae98ed186cbe6909105c536c24419e52af8fc66.tar.gz
kernel_samsung_espresso10-6ae98ed186cbe6909105c536c24419e52af8fc66.tar.bz2
watchdog: Propagate Book E WDT period changes to all cores
When the watchdog period is changed, it needs to be propagated to all cores in addition to the core that performed the change. Signed-off-by: Randy Vinson <rvinson@mvista.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/booke_wdt.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 636e013..7e7ec9c 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -85,6 +85,22 @@ static unsigned int sec_to_period(unsigned int secs)
return 0;
}
+static void __booke_wdt_set(void *data)
+{
+ u32 val;
+
+ val = mfspr(SPRN_TCR);
+ val &= ~WDTP_MASK;
+ val |= WDTP(booke_wdt_period);
+
+ mtspr(SPRN_TCR, val);
+}
+
+static void booke_wdt_set(void)
+{
+ on_each_cpu(__booke_wdt_set, NULL, 0);
+}
+
static void __booke_wdt_ping(void *data)
{
mtspr(SPRN_TSR, TSR_ENW|TSR_WIS);
@@ -181,8 +197,7 @@ static long booke_wdt_ioctl(struct file *file,
#else
booke_wdt_period = tmp;
#endif
- mtspr(SPRN_TCR, (mfspr(SPRN_TCR) & ~WDTP_MASK) |
- WDTP(booke_wdt_period));
+ booke_wdt_set();
return 0;
case WDIOC_GETTIMEOUT:
return put_user(booke_wdt_period, p);