[PATCH v2 2/2] usb: dwc2: Fix probe problem on bcm2835

John Youn John.Youn at synopsys.com
Mon Jan 11 16:32:28 PST 2016


Fixes an issue found on Raspberry PI platform that prevents probe. Don't
skip setting the force mode if it's already set.

Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode")
Signed-off-by: John Youn <johnyoun at synopsys.com>
Reported-by: Stefan Wahren <stefan.wahren at i2se.com>
Reported-by: Remi Pommarel <repk at triplefau.lt>
Tested-by: Stefan Wahren <stefan.wahren at i2se.com>
Tested-by: Remi Pommarel <repk at triplefau.lt>
---
 drivers/usb/dwc2/core.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 3a0bfde..635da01 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -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);
-- 
2.6.3




More information about the linux-rpi-kernel mailing list