提交 842ef9a9 编写于 作者: S Stephen Warren 提交者: Marek Vasut

usb: ci_udc: implement dfu_usb_get_reset

This allows the USB code to determine whether a USB bus reset was issued,
which in turn allows the code to differentiate between a detach (return
to shell prompt) and a board reset/reboot request.
Signed-off-by: NStephen Warren <swarren@nvidia.com>
上级 f2ec4e34
......@@ -919,3 +919,10 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
return 0;
}
bool dfu_usb_get_reset(void)
{
struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor;
return !!(readl(&udc->usbsts) & STS_URI);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册