Skip to content

Commit 4db7575

Browse files
gundberggregkh
gundberg
authored andcommitted
watchdog: kempld-wdt: Use the correct value when configuring the prescaler with the watchdog
commit a9e0436 upstream. Use the prescaler index, rather than its value, to configure the watchdog. This will prevent a mismatch with the prescaler used to calculate the cycles. Signed-off-by: Per Gundberg <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Michael Brunner <[email protected]> Tested-by: Michael Brunner <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1814990 commit 4db7575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/kempld_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data,
162162
kempld_get_mutex(pld);
163163
stage_cfg = kempld_read8(pld, KEMPLD_WDT_STAGE_CFG(stage->id));
164164
stage_cfg &= ~STAGE_CFG_PRESCALER_MASK;
165-
stage_cfg |= STAGE_CFG_SET_PRESCALER(prescaler);
165+
stage_cfg |= STAGE_CFG_SET_PRESCALER(PRESCALER_21);
166166
kempld_write8(pld, KEMPLD_WDT_STAGE_CFG(stage->id), stage_cfg);
167167
kempld_write32(pld, KEMPLD_WDT_STAGE_TIMEOUT(stage->id),
168168
stage_timeout);

0 commit comments

Comments
 (0)