]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
071831cf95a44792e6a8f85ca732a21c1d160871
[thirdparty/kernel/stable-queue.git] /
1 From a9e0436b303e94ba57d3bd4b1fcbeaa744b7ebeb Mon Sep 17 00:00:00 2001
2 From: gundberg <per.gundberg@icomera.com>
3 Date: Thu, 24 Apr 2014 15:49:19 +0200
4 Subject: watchdog: kempld-wdt: Use the correct value when configuring the prescaler with the watchdog
5
6 From: gundberg <per.gundberg@icomera.com>
7
8 commit a9e0436b303e94ba57d3bd4b1fcbeaa744b7ebeb upstream.
9
10 Use the prescaler index, rather than its value, to configure the watchdog.
11 This will prevent a mismatch with the prescaler used to calculate the cycles.
12
13 Signed-off-by: Per Gundberg <per.gundberg@icomera.com>
14 Reviewed-by: Guenter Roeck <linux@roeck-us.net>
15 Reviewed-by: Michael Brunner <michael.brunner@kontron.com>
16 Tested-by: Michael Brunner <michael.brunner@kontron.com>
17 Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20 ---
21 drivers/watchdog/kempld_wdt.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/drivers/watchdog/kempld_wdt.c
25 +++ b/drivers/watchdog/kempld_wdt.c
26 @@ -162,7 +162,7 @@ static int kempld_wdt_set_stage_timeout(
27 kempld_get_mutex(pld);
28 stage_cfg = kempld_read8(pld, KEMPLD_WDT_STAGE_CFG(stage->id));
29 stage_cfg &= ~STAGE_CFG_PRESCALER_MASK;
30 - stage_cfg |= STAGE_CFG_SET_PRESCALER(prescaler);
31 + stage_cfg |= STAGE_CFG_SET_PRESCALER(PRESCALER_21);
32 kempld_write8(pld, KEMPLD_WDT_STAGE_CFG(stage->id), stage_cfg);
33 kempld_write32(pld, KEMPLD_WDT_STAGE_TIMEOUT(stage->id),
34 stage_timeout);