[1/3] watchdog: omap_wdt: Fix WDT timeout configuration
diff mbox series

Message ID 20200124044425.469550-1-marex@denx.de
State Accepted, archived
Commit 8a9ec4dd5f0fe3f221721a94cdc45a2a6edb5927
Delegated to: Lokesh Vutla
Headers show
Series
  • [1/3] watchdog: omap_wdt: Fix WDT timeout configuration
Related show

Commit Message

Marek Vasut Jan. 24, 2020, 4:44 a.m. UTC
The timeout parameter of omap3_wdt_start() is in miliseconds, while
GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT
driver is actually usable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Suniel Mahesh <sunil.m@techveda.org>
---
 drivers/watchdog/omap_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lokesh Vutla Feb. 3, 2020, 2:26 p.m. UTC | #1
On 24/01/20 10:14 AM, Marek Vasut wrote:
> The timeout parameter of omap3_wdt_start() is in miliseconds, while
> GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT
> driver is actually usable.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Sam Protsenko <semen.protsenko@linaro.org>
> Cc: Suniel Mahesh <sunil.m@techveda.org>

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

A cover letter would really be nice to get a brief on the series.

Thanks and regards,
Lokesh
Lokesh Vutla Feb. 4, 2020, 4:04 a.m. UTC | #2
On 24/01/20 10:14 AM, Marek Vasut wrote:
> The timeout parameter of omap3_wdt_start() is in miliseconds, while
> GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT
> driver is actually usable.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Sam Protsenko <semen.protsenko@linaro.org>
> Cc: Suniel Mahesh <sunil.m@techveda.org>

Series pulled into u-boot-ti tree.

Thanks and regards,
Lokesh

Patch
diff mbox series

diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 284cfbb2a8..b9cdf70036 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -188,7 +188,7 @@  static int omap3_wdt_stop(struct udevice *dev)
 static int omap3_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
 {
 	struct omap3_wdt_priv *priv = dev_get_priv(dev);
-	u32 pre_margin = GET_WLDR_VAL(timeout_ms);
+	u32 pre_margin = GET_WLDR_VAL(timeout_ms / 1000);
 /*
  * Make sure the watchdog is disabled. This is unfortunately required
  * because writing to various registers with the watchdog running has no