From: Michal Simek Date: Wed, 27 Jun 2018 12:16:54 +0000 (+0200) Subject: usb_kbd: Add support for watchdog X-Git-Tag: v2025.01-rc5-pxa1908~3978^2~47 X-Git-Url: http://git.dujemihanovic.xyz/%22/img/sics.gif/%22/static/git-favicon.png?a=commitdiff_plain;h=f8f3e0e539e08da381e397ba58fcc2df195ae2ec;p=u-boot.git usb_kbd: Add support for watchdog There is need to service watchdog in while loop or system will be restarted when idlying. Signed-off-by: Michal Simek --- diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 8b2fccf9ca..406bd37e6a 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -387,8 +388,10 @@ static int usb_kbd_getc(struct stdio_dev *sdev) usb_kbd_dev = (struct usb_device *)dev->priv; data = usb_kbd_dev->privptr; - while (data->usb_in_pointer == data->usb_out_pointer) + while (data->usb_in_pointer == data->usb_out_pointer) { + WATCHDOG_RESET(); usb_kbd_poll_for_event(usb_kbd_dev); + } if (data->usb_out_pointer == USB_KBD_BUFFER_LEN - 1) data->usb_out_pointer = 0;