提交 fab38333 编写于 作者: T Thinh Nguyen 提交者: Felipe Balbi

usb: dwc3: Add SoftReset PHY synchonization delay

From DWC_usb31 programming guide section 1.3.2, once DWC3_DCTL_CSFTRST
bit is cleared, we must wait at least 50ms before accessing the PHY
domain (synchronization delay).
Signed-off-by: NThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 cabdf83d
...@@ -244,7 +244,7 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc) ...@@ -244,7 +244,7 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
do { do {
reg = dwc3_readl(dwc->regs, DWC3_DCTL); reg = dwc3_readl(dwc->regs, DWC3_DCTL);
if (!(reg & DWC3_DCTL_CSFTRST)) if (!(reg & DWC3_DCTL_CSFTRST))
return 0; goto done;
udelay(1); udelay(1);
} while (--retries); } while (--retries);
...@@ -253,6 +253,17 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc) ...@@ -253,6 +253,17 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
phy_exit(dwc->usb2_generic_phy); phy_exit(dwc->usb2_generic_phy);
return -ETIMEDOUT; return -ETIMEDOUT;
done:
/*
* For DWC_usb31 controller, once DWC3_DCTL_CSFTRST bit is cleared,
* we must wait at least 50ms before accessing the PHY domain
* (synchronization delay). DWC_usb31 programming guide section 1.3.2.
*/
if (dwc3_is_usb31(dwc))
msleep(50);
return 0;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册