xyz-modem: Fix timeout loop waiting with WATCHDOG
[oweals/u-boot.git] / common / xyzModem.c
index e5c65b480a2b64837f18b41cfef3c59aa74a40bd..e85da74a698f373c837987228f2a99b4a318a136 100644 (file)
@@ -25,6 +25,7 @@
 #include <xyzModem.h>
 #include <stdarg.h>
 #include <u-boot/crc.h>
+#include <watchdog.h>
 
 /* Assumption - run xyzModem protocol over the console port */
 
@@ -63,6 +64,7 @@ CYGACC_COMM_IF_GETC_TIMEOUT (char chan, char *c)
 {
 
   ulong now = get_timer(0);
+  WATCHDOG_RESET();
   while (!tstc ())
     {
       if (get_timer(now) > xyzModem_CHAR_TIMEOUT)