mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
UPSTREAM: 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. Change-Id: I8fcef478dd4ad669cb3fc49d2308d126873213c7 Fixes:09c96980dc("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> Signed-off-by: Huang, Tao <huangtao@rock-chips.com> (cherry picked from commit192cb07f79)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user