OSDN Git Service

usb: dwc3: Rename DWC3_DCTL_LPM_ERRATA
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 25 Apr 2019 20:55:30 +0000 (13:55 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 3 May 2019 06:13:49 +0000 (09:13 +0300)
The macro name DWC3_DCTL_LPM_ERRATA is uninformative and does not do
masking. Remove DWC3_DCTL_LPM_ERRATA_MASK and rename
DWC3_DCTL_LPM_ERRATA to DWC3_DCTL_NYET_THRES with proper masking.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c

index 1528d39..f19cbeb 100644 (file)
 #define DWC3_DCTL_TRGTULST_SS_INACT    (DWC3_DCTL_TRGTULST(6))
 
 /* These apply for core versions 1.94a and later */
-#define DWC3_DCTL_LPM_ERRATA_MASK      DWC3_DCTL_LPM_ERRATA(0xf)
-#define DWC3_DCTL_LPM_ERRATA(n)                ((n) << 20)
+#define DWC3_DCTL_NYET_THRES(n)                (((n) & 0xf) << 20)
 
 #define DWC3_DCTL_KEEP_CONNECT         BIT(19)
 #define DWC3_DCTL_L1_HIBER_EN          BIT(18)
index ab53f71..d676553 100644 (file)
@@ -2863,7 +2863,7 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
                                "LPM Erratum not available on dwc3 revisions < 2.40a\n");
 
                if (dwc->has_lpm_erratum && dwc->revision >= DWC3_REVISION_240A)
-                       reg |= DWC3_DCTL_LPM_ERRATA(dwc->lpm_nyet_threshold);
+                       reg |= DWC3_DCTL_NYET_THRES(dwc->lpm_nyet_threshold);
 
                dwc3_writel(dwc->regs, DWC3_DCTL, reg);
        } else {