[U-Boot] [PATCH] dfu: cmd: trigger watchdog before calling usb_gadget_handle_interrupts
Heiko Schocher
hs at denx.de
Thu Mar 12 15:34:10 CET 2015
trigger watchdog before calling usb_gadget_handle_interrupts()
This prevents board resets when calling dfu command on boards
which have a watchdog.
Signed-off-by: Heiko Schocher <hs at denx.de>
---
common/cmd_dfu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
index e975abe..46af4cf 100644
--- a/common/cmd_dfu.c
+++ b/common/cmd_dfu.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <watchdog.h>
#include <dfu.h>
#include <g_dnl.h>
#include <usb.h>
@@ -64,6 +65,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (ctrlc())
goto exit;
+ WATCHDOG_RESET();
usb_gadget_handle_interrupts();
}
exit:
--
2.1.0
More information about the U-Boot
mailing list