From: John Youn Date: Mon, 15 Feb 2016 23:30:20 +0000 (-0800) Subject: UPSTREAM: usb: dwc2: Add extra delay when forcing dr_mode X-Git-Tag: firefly_0821_release~889 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c7b113cd6698ed8d136c3cad8d9700788fe360c;p=firefly-linux-kernel-4.4.55.git UPSTREAM: usb: dwc2: Add extra delay when forcing dr_mode Fixes an issue found on rockchip rk3036 and rk3188 SOC platforms. For some reason, the existing msleep(25) is not enough after the force mode. The following patch was reported to fix the issue. This does increase the probe delay again slightly, but not up to the level it was before the original series of patches that this fixes. It does not cause any other issues when tested on Synopsys HAPS and Altera socfpga platforms. Need to revisit this series next release to see if we can address these issues without having an unconditional delay. Change-Id: Ie06514eb87b0acc66edca21755069ba69751e6a5 Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode") Reported-by: Caesar Wang Reported-by: Michael Niewoehner Tested-by: Heiko Stuebner Tested-by: Caesar Wang Signed-off-by: John Youn Signed-off-by: Felipe Balbi Signed-off-by: Huang, Tao (cherry picked from commit bd84f4ae9986ac9acd278566ccb39c60bc961abb) --- diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c index e991d55914db..46c4ba75dc2a 100644 --- a/drivers/usb/dwc2/core.c +++ b/drivers/usb/dwc2/core.c @@ -619,6 +619,12 @@ void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg) __func__, hsotg->dr_mode); break; } + + /* + * NOTE: This is required for some rockchip soc based + * platforms. + */ + msleep(50); } /*