usb: dwc2: regression on bcm2835 after commit 09c96980dc72
Remi Pommarel
repk at triplefau.lt
Sat Jan 2 05:55:31 PST 2016
Hi Stefan, Hi John,
On Mon, Dec 28, 2015 at 3:16:47AM -0800, Stefan Wharen wrote:
>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 also find a regression on Raspberry Pi.
>
>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);
I came up with the same patch, but it does not seem to fix everything. Indeed
263b7fb557f797d9d4d1dcf93fb6bb2efc3f1d46 (previous patch in patchset) seems
to break USB ethernet also.
My guess is that bcm2835 still need dwc2_core_reset_and_force_dr_mode()
before dwc2_get_hwparams().
Do you have any idea ?
Regards
--
Remi
More information about the linux-rpi-kernel
mailing list