[U-Boot] [PATCH 1/2] lib: Add WATCHDOG_RESET to wait_bit.h

Michal Simek michal.simek at xilinx.com
Mon Dec 12 09:58:23 CET 2016


wait_for_bit() is missing reset watchdog in case watchdog
is configured.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 include/wait_bit.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/wait_bit.h b/include/wait_bit.h
index 066e30c118af..06ad43a122d6 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -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,
-- 
1.9.1



More information about the U-Boot mailing list