usb: dwc2: regression on bcm2835 after commit 09c96980dc72

Stefan Wahren stefan.wahren at i2se.com
Sun Dec 27 19:16:47 PST 2015


Hi John,

the commit 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode")
in Felipe's USB repo causes a regression on Raspberry Pi B which prevents the
probing of the dwc2 driver.

I attached a patch which fixes the regression but i'm not sure that's the right
way.

Regards
Stefan

-------------------------8<----------------------------------
diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index 39a0fa8..3f5fb31 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);



More information about the linux-rpi-kernel mailing list