From: Marek Vasut Date: Fri, 24 Jan 2020 04:44:23 +0000 (+0100) Subject: watchdog: omap_wdt: Fix WDT timeout configuration X-Git-Tag: v2020.04-rc2~19^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8a9ec4dd5f0fe3f221721a94cdc45a2a6edb5927;p=oweals%2Fu-boot.git watchdog: omap_wdt: Fix WDT timeout configuration 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 Cc: Grygorii Strashko Cc: Sam Protsenko Cc: Suniel Mahesh Reviewed-by: Lokesh Vutla Signed-off-by: Lokesh Vutla --- 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