Commit 192cb07f authored by John Youn's avatar John Youn Committed by Felipe Balbi

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: 09c96980 ("usb: dwc2: Add functions to set and clear force mode")
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Reported-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Reported-by: default avatarRemi Pommarel <repk@triplefau.lt>
Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Tested-by: default avatarRemi Pommarel <repk@triplefau.lt>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 03b32e4c
......@@ -572,12 +572,6 @@ static bool dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE;
clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE;
/*
* If the force mode bit is already set, don't set it.
*/
if ((gusbcfg & set) && !(gusbcfg & clear))
return false;
gusbcfg &= ~clear;
gusbcfg |= set;
dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment