Skip to content

Commit

Permalink
watchdog: kempld-wdt: Use the correct value when configuring the pres…
Browse files Browse the repository at this point in the history
…caler 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]>
  • Loading branch information
gundberg authored and gregkh committed Jul 7, 2014
1 parent 1814990 commit 4db7575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/kempld_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data,
kempld_get_mutex(pld);
stage_cfg = kempld_read8(pld, KEMPLD_WDT_STAGE_CFG(stage->id));
stage_cfg &= ~STAGE_CFG_PRESCALER_MASK;
stage_cfg |= STAGE_CFG_SET_PRESCALER(prescaler);
stage_cfg |= STAGE_CFG_SET_PRESCALER(PRESCALER_21);
kempld_write8(pld, KEMPLD_WDT_STAGE_CFG(stage->id), stage_cfg);
kempld_write32(pld, KEMPLD_WDT_STAGE_TIMEOUT(stage->id),
stage_timeout);
Expand Down

0 comments on commit 4db7575

Please sign in to comment.