aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 689381a24887..8ad42b83f995 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -68,12 +68,6 @@ module_param(nowayout, bool, 0);
68MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " 68MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
69 "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 69 "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
70 70
71/*
72 * We always prescale, but if someone really doesn't want to they can set this
73 * to 0
74 */
75static int prescale = 1;
76
77static DEFINE_SPINLOCK(wdt_spinlock); 71static DEFINE_SPINLOCK(wdt_spinlock);
78 72
79static void mpc8xxx_wdt_keepalive(void) 73static void mpc8xxx_wdt_keepalive(void)
@@ -101,11 +95,9 @@ static void mpc8xxx_wdt_timer_ping(unsigned long arg)
101 95
102static int mpc8xxx_wdt_start(struct watchdog_device *w) 96static int mpc8xxx_wdt_start(struct watchdog_device *w)
103{ 97{
104 u32 tmp = SWCRR_SWEN; 98 u32 tmp = SWCRR_SWEN | SWCRR_SWPR;
105 99
106 /* Good, fire up the show */ 100 /* Good, fire up the show */
107 if (prescale)
108 tmp |= SWCRR_SWPR;
109 if (reset) 101 if (reset)
110 tmp |= SWCRR_SWRI; 102 tmp |= SWCRR_SWRI;
111 103
@@ -179,10 +171,7 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev)
179 } 171 }
180 172
181 /* Calculate the timeout in seconds */ 173 /* Calculate the timeout in seconds */
182 if (prescale) 174 timeout_sec = (timeout * wdt_type->prescaler) / freq;
183 timeout_sec = (timeout * wdt_type->prescaler) / freq;
184 else
185 timeout_sec = timeout / freq;
186 175
187 mpc8xxx_wdt_dev.timeout = timeout_sec; 176 mpc8xxx_wdt_dev.timeout = timeout_sec;
188#ifdef MODULE 177#ifdef MODULE