diff options
| author | John Youn <John.Youn@synopsys.com> | 2016-01-11 19:32:28 -0500 |
|---|---|---|
| committer | Felipe Balbi <balbi@kernel.org> | 2016-02-03 13:15:49 -0500 |
| commit | 192cb07f7928e8cb09a9851e6c0f7478baa3bc6d (patch) | |
| tree | 487796537df91d5babf9b7c8cc8b32e50232c8da | |
| parent | 03b32e4c9bd1b52fcf1e4304e7a704aa0315e398 (diff) | |
usb: dwc2: Fix probe problem on bcm2835
Fixes an issue found on Raspberry PI platform that prevents probe. Don't
skip setting the force mode if it's already set.
Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode")
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Reported-by: Remi Pommarel <repk@triplefau.lt>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
| -rw-r--r-- | drivers/usb/dwc2/core.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index 1489d315f287..e991d55914db 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c | |||
| @@ -572,12 +572,6 @@ static bool dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host) | |||
| 572 | set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE; | 572 | set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE; |
| 573 | clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE; | 573 | clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE; |
| 574 | 574 | ||
| 575 | /* | ||
| 576 | * If the force mode bit is already set, don't set it. | ||
| 577 | */ | ||
| 578 | if ((gusbcfg & set) && !(gusbcfg & clear)) | ||
| 579 | return false; | ||
| 580 | |||
| 581 | gusbcfg &= ~clear; | 575 | gusbcfg &= ~clear; |
| 582 | gusbcfg |= set; | 576 | gusbcfg |= set; |
| 583 | dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG); | 577 | dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG); |
