summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2020-01-24 05:44:23 +0100
committerLokesh Vutla <lokeshvutla@ti.com>2020-02-04 09:07:24 +0530
commit8a9ec4dd5f0fe3f221721a94cdc45a2a6edb5927 (patch)
tree3eddc058a98656eead91e7e69d05cf2f134fcdc5 /drivers/watchdog
parent5b36241a2a48e189b438cb01c863bd8eb0c54bb5 (diff)
downloadu-boot-8a9ec4dd5f0fe3f221721a94cdc45a2a6edb5927.tar.gz
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 <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> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/omap_wdt.c2
1 files changed, 1 insertions, 1 deletions
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