Browse Source

usb: dwc3: use correct hwparam register for power mgm check

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>
Sebastian Andrzej Siewior 13 years ago
parent
commit
164d773168
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/dwc3/core.c

+ 1 - 1
drivers/usb/dwc3/core.c

@@ -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;