[02/10] watchdog: keembay: Upadate WDT pretimeout for every update in timeout
diff mbox series

Message ID 20210512084724.14634-3-shruthi.sanil@intel.com
State New, archived
Headers show
Series
  • Intel Keem Bay WDT bug fixes
Related show

Commit Message

Sanil, Shruthi May 12, 2021, 8:47 a.m. UTC
From: Shruthi Sanil <shruthi.sanil@intel.com>

The pre-timeout value to be programmed to the register has to be
calculated and updated for every change in the timeout value.
Else the threshold time wouldn't be calculated to its
corresponding timeout.

Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Kris Pan <kris.pan@intel.com>
Signed-off-by: Shruthi Sanil <shruthi.sanil@intel.com>
---
 drivers/watchdog/keembay_wdt.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Guenter Roeck May 12, 2021, 1:58 p.m. UTC | #1
On Wed, May 12, 2021 at 02:17:16PM +0530, shruthi.sanil@intel.com wrote:
> From: Shruthi Sanil <shruthi.sanil@intel.com>
> 
> The pre-timeout value to be programmed to the register has to be
> calculated and updated for every change in the timeout value.
> Else the threshold time wouldn't be calculated to its
> corresponding timeout.
> 
> Fixes: fa0f8d51e90d ("watchdog: Add watchdog driver for Intel Keembay Soc")
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Tested-by: Kris Pan <kris.pan@intel.com>
> Signed-off-by: Shruthi Sanil <shruthi.sanil@intel.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/keembay_wdt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c
> index f2f5c9fae29c..b2afeb4a60e3 100644
> --- a/drivers/watchdog/keembay_wdt.c
> +++ b/drivers/watchdog/keembay_wdt.c
> @@ -109,6 +109,7 @@ static int keembay_wdt_set_timeout(struct watchdog_device *wdog, u32 t)
>  {
>  	wdog->timeout = t;
>  	keembay_wdt_set_timeout_reg(wdog);
> +	keembay_wdt_set_pretimeout_reg(wdog);
>  
>  	return 0;
>  }
> -- 
> 2.17.1
>

Patch
diff mbox series

diff --git a/drivers/watchdog/keembay_wdt.c b/drivers/watchdog/keembay_wdt.c
index f2f5c9fae29c..b2afeb4a60e3 100644
--- a/drivers/watchdog/keembay_wdt.c
+++ b/drivers/watchdog/keembay_wdt.c
@@ -109,6 +109,7 @@  static int keembay_wdt_set_timeout(struct watchdog_device *wdog, u32 t)
 {
 	wdog->timeout = t;
 	keembay_wdt_set_timeout_reg(wdog);
+	keembay_wdt_set_pretimeout_reg(wdog);
 
 	return 0;
 }