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 ]
This commit is contained in:
Heiko Schocher 2015-04-14 09:53:13 +02:00 committed by Lukasz Majewski
parent ee02a65e99
commit 0a9ac5cb5e

View 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: