Revert "usb: dwc3: gadget: Enable SUSPEND event after CONNECT DONE"

This reverts commit 74cc257a62210a7fc69cd095ecd48a364621bb7a.

Instead, enable the SUSPEND event interrupt on enable_irq as part
of gadget start to be inline with USB specification.

Change-Id: I4c2d6e48a2276b480e112ee203a18a6865f15408
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
Pratham Pratap 2020-05-26 10:10:38 +05:30 • committed by Gerrit - the friendly Code Review server
commit 51f6ca5f35

View file

@ -2206,8 +2206,14 @@ static void dwc3_gadget_enable_irq(struct dwc3 *dwc)
DWC3_DEVTEN_USBRSTEN |
DWC3_DEVTEN_DISCONNEVTEN);
/*
* Enable SUSPENDEVENT(BIT:6) for version 230A and above
* else enable USB Link change event (BIT:3) for older version
*/
if (dwc->revision < DWC3_REVISION_230A)
reg |= DWC3_DEVTEN_ULSTCNGEN;
else
reg |= DWC3_DEVTEN_EOPFEN;
dwc3_writel(dwc->regs, DWC3_DEVTEN, reg);
}
@ -3282,13 +3288,6 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
speed = reg & DWC3_DSTS_CONNECTSPD;
dwc->speed = speed;
/* Enable SUSPENDEVENT(BIT:6) for version 230A and above */
if (dwc->revision >= DWC3_REVISION_230A) {
reg = dwc3_readl(dwc->regs, DWC3_DEVTEN);
reg |= DWC3_DEVTEN_EOPFEN;
dwc3_writel(dwc->regs, DWC3_DEVTEN, reg);
}
/* Reset the retry on erratic error event count */
dwc->retries_on_error = 0;