From: Heiko Schocher Date: Tue, 14 Apr 2015 07:53:13 +0000 (+0200) Subject: dfu: cmd: trigger watchdog before calling usb_gadget_handle_interrupts X-Git-Tag: v2015.07-rc1~349 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0a9ac5cb5e3c5a7f0c231432a0f7b690a03d8c8b;p=oweals%2Fu-boot.git dfu: cmd: trigger watchdog before calling usb_gadget_handle_interrupts 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 [ Reedition by Lukasz Majewski to apply to v2014.04 release ] --- diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index ec90998176..857148f8af 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -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(controller_index); } exit: