diff options
author | Jingwu Lin <jingwu.lin@intel.com> | 2015-04-29 22:09:17 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-04-29 15:20:05 -0500 |
commit | 96d480e65ea0e4e950f75029b8a1ff4c1269f8b0 (patch) | |
tree | 7c1eae6686b9f842bdf96a73daa406943ae0bac8 /drivers/usb/dwc2 | |
parent | db62b9a804b465f5050438eb06151c99c625ec9a (diff) | |
download | op-kernel-dev-96d480e65ea0e4e950f75029b8a1ff4c1269f8b0.zip op-kernel-dev-96d480e65ea0e4e950f75029b8a1ff4c1269f8b0.tar.gz |
usb: dwc2: host: implement test mode
Add support for SetPortFeature(PORT_TEST) for root port.
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Jingwu Lin <jingwu.lin@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 745230d..4773d27 100644 --- 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, |