usb: dwc3: use correct hwparam register for power mgm check
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 24 Nov 2011 10:22:05 +0000 (11:22 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:48:44 +0000 (11:48 +0200)
We mask the correct bits within the wrong register. The power
optimization mode is stored hwparam1 register and not in hwparam0.

Reported-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.c

index 6910a2d14d93c072897adea292bd8ae696fd2926..455bb1e748d7db01899e6f516304fc7b7c1b30d6 100644 (file)
@@ -353,7 +353,7 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc)
        reg &= ~DWC3_GCTL_SCALEDOWN(3);
        reg &= ~DWC3_GCTL_DISSCRAMBLE;
 
-       switch (DWC3_GHWPARAMS1_EN_PWROPT(dwc->hwparams.hwparams0)) {
+       switch (DWC3_GHWPARAMS1_EN_PWROPT(dwc->hwparams.hwparams1)) {
        case DWC3_GHWPARAMS1_EN_PWROPT_CLK:
                reg &= ~DWC3_GCTL_DSBLCLKGTNG;
                break;