OSDN Git Service

dwc3: core: clear DELAYP1TRANS with USB3PIPECTL register
authorMayank Rana <mrana@codeaurora.org>
Thu, 8 Sep 2016 18:09:37 +0000 (11:09 -0700)
committerMayank Rana <mrana@codeaurora.org>
Wed, 21 Sep 2016 16:12:06 +0000 (09:12 -0700)
Commit fd115e68971b ("dwc3: core: Don't perform controller and PHYs
soft reset") removed clearing DELAYP1TRANS. It is recommended to clear
DELAYP1TRANS bit with USB3PIPECTL register which controls USB
controller allowing USB QMP PHY low power transitions.

Change-Id: I54ba694f4c997bf5ecc540cee274e2cb07b77446
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
drivers/usb/dwc3/core.c

index 7585c60..9fb05bb 100644 (file)
@@ -155,6 +155,7 @@ static int dwc3_init_usb_phys(struct dwc3 *dwc)
 static int dwc3_core_reset(struct dwc3 *dwc)
 {
        int             ret;
+       u32     reg;
 
        /* Reset PHYs */
        usb_phy_reset(dwc->usb2_phy);
@@ -168,6 +169,10 @@ static int dwc3_core_reset(struct dwc3 *dwc)
                return ret;
        }
 
+       reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0));
+       reg &= ~DWC3_GUSB3PIPECTL_DELAYP1TRANS;
+       dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg);
+
        dwc3_notify_event(dwc, DWC3_CONTROLLER_RESET_EVENT);
 
        dwc3_notify_event(dwc, DWC3_CONTROLLER_POST_RESET_EVENT);