projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db62b9a
)
usb: dwc2: host: implement test mode
author
Jingwu Lin
<
[email protected]
>
Wed, 29 Apr 2015 20:09:17 +0000
(22:09 +0200)
committer
Felipe Balbi
<
[email protected]
>
Wed, 29 Apr 2015 20:20:05 +0000
(15:20 -0500)
Add support for SetPortFeature(PORT_TEST) for root port.
Acked-by: John Youn <
[email protected]
>
Signed-off-by: Jingwu Lin <
[email protected]
>
Signed-off-by: Felipe Balbi <
[email protected]
>
drivers/usb/dwc2/hcd.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc2/hcd.c
b/drivers/usb/dwc2/hcd.c
index 745230d0d8b31091b0297608042aa28572d6872d..4773d2770363cea8f5ae7c12bae92c88547c67e9 100644
(file)
--- a/
drivers/usb/dwc2/hcd.c
+++ b/
drivers/usb/dwc2/hcd.c
@@
-1779,6
+1779,15
@@
static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
/* Not supported */
break;
+ case USB_PORT_FEAT_TEST:
+ hprt0 = dwc2_read_hprt0(hsotg);
+ dev_dbg(hsotg->dev,
+ "SetPortFeature - USB_PORT_FEAT_TEST\n");
+ hprt0 &= ~HPRT0_TSTCTL_MASK;
+ hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
+ writel(hprt0, hsotg->regs + HPRT0);
+ break;
+
default:
retval = -EINVAL;
dev_err(hsotg->dev,