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 <hs@denx.de>
[ Reedition by Lukasz Majewski <l.majewski@samsung.com> to apply to
v2014.04 release ]
master
Heiko Schocher 9 years ago committed by Lukasz Majewski
parent ee02a65e99
commit 0a9ac5cb5e
  1. 2
      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(controller_index);
}
exit:

Loading…
Cancel
Save