usb: dwc3: replace hard-coded constant in DWC3_GCTL_SCALEDOWN(3)
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Sat, 25 Feb 2012 01:32:13 +0000 (17:32 -0800)
committerFelipe Balbi <balbi@ti.com>
Fri, 2 Mar 2012 10:12:06 +0000 (12:12 +0200)
Define DWC3_GCTL_SCALEDOWN_MASK and use it in place of
DWC3_GCTL_SCALEDOWN(3).

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h

index 3fd4e843139e6e0e8007a91fc9963233ff0a6d55..fd6917b8d0d73ec302e10b17cdaffa067da5adfc 100644 (file)
@@ -350,7 +350,7 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
        dwc3_cache_hwparams(dwc);
 
        reg = dwc3_readl(dwc->regs, DWC3_GCTL);
-       reg &= ~DWC3_GCTL_SCALEDOWN(3);
+       reg &= ~DWC3_GCTL_SCALEDOWN_MASK;
        reg &= ~DWC3_GCTL_DISSCRAMBLE;
 
        switch (DWC3_GHWPARAMS1_EN_PWROPT(dwc->hwparams.hwparams1)) {
index 81d1c0aeb6c5b58c190d6bcb2fc877b1760db9a1..f124643353bb6f95ff620c5e75ab656680d50d3b 100644 (file)
 
 #define DWC3_GCTL_CORESOFTRESET        (1 << 11)
 #define DWC3_GCTL_SCALEDOWN(n) ((n) << 4)
+#define DWC3_GCTL_SCALEDOWN_MASK DWC3_GCTL_SCALEDOWN(3)
 #define DWC3_GCTL_DISSCRAMBLE  (1 << 3)
 #define DWC3_GCTL_DSBLCLKGTNG  (1 << 0)