From: Paul Zimmerman Date: Sat, 25 Feb 2012 01:32:13 +0000 (-0800) Subject: usb: dwc3: replace hard-coded constant in DWC3_GCTL_SCALEDOWN(3) X-Git-Tag: MMI-PSA29.97-13-9~17266^2~22^2~35^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e87c42a29f14c7a346f912e084f6ab13ea8288b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git usb: dwc3: replace hard-coded constant in DWC3_GCTL_SCALEDOWN(3) Define DWC3_GCTL_SCALEDOWN_MASK and use it in place of DWC3_GCTL_SCALEDOWN(3). Signed-off-by: Paul Zimmerman Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 3fd4e843139e..fd6917b8d0d7 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -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)) { diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 81d1c0aeb6c5..f124643353bb 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -161,6 +161,7 @@ #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)