]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
watchdog: max6370: use __udelay() to avoid recursion
authorPali Rohár <pali@kernel.org>
Tue, 27 Sep 2022 10:19:19 +0000 (12:19 +0200)
committerStefan Roese <sr@denx.de>
Tue, 27 Sep 2022 10:25:51 +0000 (12:25 +0200)
The udelay() function in lib/time.c contains a WATCHDOG_RESET()
call. So use __udelay() in max6370_wdt.c to prevent recursion.

Fixes: 0a095fc53b15 ("watchdog: Add MAX6370 watchdog timer driver")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/watchdog/max6370_wdt.c

index e59cbb21fff1faaa7f7bdf3ca2f2c31de667f3ed..584a4ed468c3b07fc5e519f1653491d2d5d0fd0e 100644 (file)
@@ -72,7 +72,7 @@ static int max6370_wdt_reset(struct udevice *dev)
 
        if (dm_gpio_is_valid(&wdt->gpio_wdi)) {
                dm_gpio_set_value(&wdt->gpio_wdi, 1);
-               udelay(1);
+               __udelay(1);
                dm_gpio_set_value(&wdt->gpio_wdi, 0);
        } else {
                val = readb(wdt->reg);