diff options
author | Gregory Herrero <gregory.herrero@intel.com> | 2015-04-03 04:53:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-10 07:52:49 -0400 |
commit | 42a6630a875c17b8ad129d2cc0472217107147ad (patch) | |
tree | a6f4700885fc4dfd27b9f7db933d5d73f31753a4 | |
parent | b9cd825d066c911cd6076a539986bcf22f1cbcd7 (diff) |
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: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 93bd4a10ab52..fbbbac2150a5 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c | |||
@@ -1529,13 +1529,13 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, | |||
1529 | dev_dbg(hsotg->dev, | 1529 | dev_dbg(hsotg->dev, |
1530 | "ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); | 1530 | "ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); |
1531 | writel(0, hsotg->regs + PCGCTL); | 1531 | writel(0, hsotg->regs + PCGCTL); |
1532 | msleep(USB_RESUME_TIMEOUT); | 1532 | usleep_range(20000, 40000); |
1533 | 1533 | ||
1534 | hprt0 = dwc2_read_hprt0(hsotg); | 1534 | hprt0 = dwc2_read_hprt0(hsotg); |
1535 | hprt0 |= HPRT0_RES; | 1535 | hprt0 |= HPRT0_RES; |
1536 | writel(hprt0, hsotg->regs + HPRT0); | 1536 | writel(hprt0, hsotg->regs + HPRT0); |
1537 | hprt0 &= ~HPRT0_SUSP; | 1537 | hprt0 &= ~HPRT0_SUSP; |
1538 | usleep_range(100000, 150000); | 1538 | msleep(USB_RESUME_TIMEOUT); |
1539 | 1539 | ||
1540 | hprt0 &= ~HPRT0_RES; | 1540 | hprt0 &= ~HPRT0_RES; |
1541 | writel(hprt0, hsotg->regs + HPRT0); | 1541 | writel(hprt0, hsotg->regs + HPRT0); |