Commit 96d480e6 authored by Jingwu Lin's avatar Jingwu Lin Committed by Felipe Balbi

usb: dwc2: host: implement test mode

Add support for SetPortFeature(PORT_TEST) for root port.
Acked-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarJingwu Lin <jingwu.lin@intel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent db62b9a8
...@@ -1779,6 +1779,15 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, ...@@ -1779,6 +1779,15 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
/* Not supported */ /* Not supported */
break; 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: default:
retval = -EINVAL; retval = -EINVAL;
dev_err(hsotg->dev, dev_err(hsotg->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment