提交 42a6630a 编写于 作者: G Gregory Herrero 提交者: Greg Kroah-Hartman

usb: dwc2: host: sleep USB_RESUME_TIMEOUT during resume

msleep(USB_RESUME_TIMEOUT) must be done when the controller drives
the resume. This is true after HPRT0_RES is written.
Moreover, restore the delay after controller power is up.
Signed-off-by: NGregory Herrero <gregory.herrero@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b9cd825d
...@@ -1529,13 +1529,13 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, ...@@ -1529,13 +1529,13 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
dev_dbg(hsotg->dev, dev_dbg(hsotg->dev,
"ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); "ClearPortFeature USB_PORT_FEAT_SUSPEND\n");
writel(0, hsotg->regs + PCGCTL); writel(0, hsotg->regs + PCGCTL);
msleep(USB_RESUME_TIMEOUT); usleep_range(20000, 40000);
hprt0 = dwc2_read_hprt0(hsotg); hprt0 = dwc2_read_hprt0(hsotg);
hprt0 |= HPRT0_RES; hprt0 |= HPRT0_RES;
writel(hprt0, hsotg->regs + HPRT0); writel(hprt0, hsotg->regs + HPRT0);
hprt0 &= ~HPRT0_SUSP; hprt0 &= ~HPRT0_SUSP;
usleep_range(100000, 150000); msleep(USB_RESUME_TIMEOUT);
hprt0 &= ~HPRT0_RES; hprt0 &= ~HPRT0_RES;
writel(hprt0, hsotg->regs + HPRT0); writel(hprt0, hsotg->regs + HPRT0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册