Skip to content

Commit 192cb07

Browse files
jysnpsfelipebalbi
authored andcommitted
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: 09c9698 ("usb: dwc2: Add functions to set and clear force mode") Tested-by: Heiko Stuebner <[email protected]> Tested-by: Douglas Anderson <[email protected]> Signed-off-by: John Youn <[email protected]> Reported-by: Stefan Wahren <[email protected]> Reported-by: Remi Pommarel <[email protected]> Tested-by: Stefan Wahren <[email protected]> Tested-by: Remi Pommarel <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 03b32e4 commit 192cb07

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/usb/dwc2/core.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,6 @@ static bool dwc2_force_mode(struct dwc2_hsotg *hsotg, bool host)
572572
set = host ? GUSBCFG_FORCEHOSTMODE : GUSBCFG_FORCEDEVMODE;
573573
clear = host ? GUSBCFG_FORCEDEVMODE : GUSBCFG_FORCEHOSTMODE;
574574

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-
581575
gusbcfg &= ~clear;
582576
gusbcfg |= set;
583577
dwc2_writel(gusbcfg, hsotg->regs + GUSBCFG);

0 commit comments

Comments
 (0)