]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib: Add WATCHDOG_RESET to wait_bit.h
authorMichal Simek <michal.simek@xilinx.com>
Mon, 12 Dec 2016 08:46:09 +0000 (09:46 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 10 Jan 2017 09:18:11 +0000 (10:18 +0100)
wait_for_bit() is missing reset watchdog in case watchdog
is configured.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/wait_bit.h

index 066e30c118af9438006f53233518efb00f05cd53..06ad43a122d69f5f58830ed387183e0f213d96df 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <console.h>
+#include <watchdog.h>
 #include <linux/errno.h>
 #include <asm/io.h>
 
@@ -59,6 +60,7 @@ static inline int wait_for_bit(const char *prefix, const u32 *reg,
                }
 
                udelay(1);
+               WATCHDOG_RESET();
        }
 
        debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", prefix, reg, mask,