Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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);