From: Vincent Prince Date: Mon, 23 Oct 2017 11:16:35 +0200 Subject: [U-Boot] [U-boot][SDP] Trigger watchdog before calling usb_gadget_handle_interrupts In-Reply-To: <1508750195-15855-1-git-send-email-vincent.prince.fr@gmail.com> References: <1508750195-15855-1-git-send-email-vincent.prince.fr@gmail.com> Message-ID: <1508750195-15855-2-git-send-email-vincent.prince.fr@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This prevents board resets when calling sdp command on boards which have a watchdog. Signed-off-by: Vincent Prince --- drivers/usb/gadget/f_sdp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index 0fae66b..c3eba6d 100644 --- a/drivers/usb/gadget/f_sdp.c +++ b/drivers/usb/gadget/f_sdp.c @@ -32,6 +32,7 @@ #include #include #include +#include #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(); -- 2.7.4