projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2ec4e3
)
usb: ci_udc: implement dfu_usb_get_reset
author
Stephen Warren
<swarren@nvidia.com>
Mon, 25 Aug 2014 20:02:15 +0000
(14:02 -0600)
committer
Marek Vasut
<marex@denx.de>
Tue, 2 Sep 2014 12:29:28 +0000
(14:29 +0200)
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: Stephen Warren <swarren@nvidia.com>
drivers/usb/gadget/ci_udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/ci_udc.c
b/drivers/usb/gadget/ci_udc.c
index 4cd19c3afd2242219dc523cd2e8d0ab064c785eb..2572b346ebfa39c8204aa45912e119ea17104dfd 100644
(file)
--- a/
drivers/usb/gadget/ci_udc.c
+++ b/
drivers/usb/gadget/ci_udc.c
@@
-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);
+}