UPSTREAM: Trigger watchdog before calling usb_gadget_handle_interrupts

This prevents board resets when calling sdp command on boards which have a watchdog.

Change-Id: Ice6421fda757ae104afee5aa9a2dea584de05192
Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 8171dac00dfcb4c67ad2e4aafaf28fe91d9c5368)
This commit is contained in:
Vincent Prince 2017-10-23 11:16:35 +02:00 committed by Frank Wang
parent b27ae02dfd
commit ebf1b63aee
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@
#include <spl.h>
#include <image.h>
#include <imximage.h>
#include <watchdog.h>
#define HID_REPORT_ID_MASK 0x000000ff
@ -602,6 +603,8 @@ int sdp_init(int controller_index)
puts("\rCTRL+C - Operation aborted.\n");
return 1;
}
WATCHDOG_RESET();
usb_gadget_handle_interrupts(controller_index);
}
@ -712,6 +715,7 @@ void sdp_handle(int controller_index)
return;
}
WATCHDOG_RESET();
usb_gadget_handle_interrupts(controller_index);
sdp_handle_in_ep();