diff options
author | Tom Rini <trini@konsulko.com> | 2020-03-16 12:33:24 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-03-16 12:33:24 -0400 |
commit | a4df9d8ab848ea4ff10b247ae435b0a14bbbd066 (patch) | |
tree | 0510515378f74c4c4687819e1babfd531fdb5254 /drivers/watchdog/wdt-uclass.c | |
parent | 50be9f0e1ccc0909e65132cff216743a49046f97 (diff) | |
parent | 6d8eae9ab7d17ca3ce84c5e6e29bd452936ad407 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Fix timer wrap (Chris)
- Use dev_read only if OF_PLATDATA is not enabled (Walter)
Diffstat (limited to 'drivers/watchdog/wdt-uclass.c')
-rw-r--r-- | drivers/watchdog/wdt-uclass.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c index cf1c527473..d9e4dc7cb8 100644 --- a/drivers/watchdog/wdt-uclass.c +++ b/drivers/watchdog/wdt-uclass.c @@ -7,6 +7,7 @@ #include <dm.h> #include <errno.h> #include <hang.h> +#include <time.h> #include <wdt.h> #include <dm/device-internal.h> #include <dm/lists.h> @@ -83,7 +84,7 @@ void watchdog_reset(void) /* Do not reset the watchdog too often */ now = get_timer(0); - if (now > next_reset) { + if (time_after(now, next_reset)) { next_reset = now + 1000; /* reset every 1000ms */ wdt_reset(gd->watchdog_dev); } |