提交 192cb07f 编写于 作者: J John Youn 提交者: 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: NHeiko Stuebner <heiko@sntech.de>
Tested-by: NDouglas Anderson <dianders@chromium.org>
Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
Reported-by: NStefan Wahren <stefan.wahren@i2se.com>
Reported-by: NRemi Pommarel <repk@triplefau.lt>
Tested-by: NStefan Wahren <stefan.wahren@i2se.com>
Tested-by: NRemi Pommarel <repk@triplefau.lt>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册