mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
usb: dwc3: Set SUSPENDENABLE soon after phy init
After phy initialization, some phy operations can only be executed while
in lower P states. Ensure GUSB3PIPECTL.SUSPENDENABLE and
GUSB2PHYCFG.SUSPHY are set soon after initialization to avoid blocking
phy ops.
Previously the SUSPENDENABLE bits are only set after the controller
initialization, which may not happen right away if there's no gadget
driver or xhci driver bound. Revise this to clear SUSPENDENABLE bits
only when there's mode switching (change in GCTL.PRTCAPDIR).
Fixes: 6d73572206 ("usb: dwc3: core: Prevent phy suspend during init")
Cc: stable <stable@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/633aef0afee7d56d2316f7cc3e1b2a6d518a8cc9.1738280911.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2b66ef84d0
commit
cc5bfc4e16
@@ -173,7 +173,7 @@ void dwc3_otg_init(struct dwc3 *dwc)
|
||||
* block "Initialize GCTL for OTG operation".
|
||||
*/
|
||||
/* GCTL.PrtCapDir=2'b11 */
|
||||
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG);
|
||||
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG, true);
|
||||
/* GUSB2PHYCFG0.SusPHY=0 */
|
||||
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
|
||||
reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
|
||||
@@ -556,7 +556,7 @@ int dwc3_drd_init(struct dwc3 *dwc)
|
||||
|
||||
dwc3_drd_update(dwc);
|
||||
} else {
|
||||
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG);
|
||||
dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG, true);
|
||||
|
||||
/* use OTG block to get ID event */
|
||||
irq = dwc3_otg_get_irq(dwc);
|
||||
|
||||
Reference in New Issue
Block a user