From: Felipe Balbi Date: Fri, 23 Sep 2016 08:20:40 +0000 (+0300) Subject: usb: dwc3: gadget: conditionally disable Link State change events X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=799e9dc82968c66d6f8faf96d0bd01e515b0b2f2;p=linux-beck.git usb: dwc3: gadget: conditionally disable Link State change events Link State Change events are only needed for debugging and to apply certain workarounds on known errata. Let's save a few cycles by disabling these events completely on working revisions of the core. Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 99ad3ca498aa..ee949420ee26 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1537,11 +1537,13 @@ static void dwc3_gadget_enable_irq(struct dwc3 *dwc) DWC3_DEVTEN_CMDCMPLTEN | DWC3_DEVTEN_ERRTICERREN | DWC3_DEVTEN_WKUPEVTEN | - DWC3_DEVTEN_ULSTCNGEN | DWC3_DEVTEN_CONNECTDONEEN | DWC3_DEVTEN_USBRSTEN | DWC3_DEVTEN_DISCONNEVTEN); + if (dwc->revision < DWC3_REVISION_250A) + reg |= DWC3_DEVTEN_ULSTCNGEN; + dwc3_writel(dwc->regs, DWC3_DEVTEN, reg); }