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)
committerLukasz Majewski <l.majewski@samsung.com>
Tue, 14 Apr 2015 08:18:49 +0000 (10:18 +0200)
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 ec909981762185bb498c8b2330dda79d76666152..857148f8afef2562098358bc6615506d14716fc3 100644 (file)
@@ -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(controller_index);
        }
 exit: