dfu: cmd: trigger watchdog before calling usb_gadget_handle_interrupts
authorHeiko Schocher <hs@denx.de>
Tue, 14 Apr 2015 07:53:13 +0000 (09:53 +0200)
committerChanho Park <chanho61.park@samsung.com>
Fri, 24 Jul 2015 07:30:14 +0000 (16:30 +0900)
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@denx.de>
[ Reedition by Lukasz Majewski <l.majewski@samsung.com> to apply to
v2014.04 release ]

common/cmd_dfu.c

index 12a86d0f2fba3fef3a7d74d51fecec5b505f6962..575e2a5eba45c98a7ee3f7e8494b878ccd7d6d2b 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <watchdog.h>
 #include <dfu.h>
 #include <g_dnl.h>
 #include <usb.h>
@@ -76,6 +77,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: