Skip to content

Commit b8663f5

Browse files
ADESTMatorgue
authored andcommitted
usb: dwc2: defer probe in case of core reset failure
Normally the core reset can take several clocks, depending on the current state of the core. After this bit is cleared, the application must wait at least 3 PHY clocks before doing any access to the PHY domain (synchronization delay). But on STM32MP15, after the 10ms delay, the bit is still not cleared. The reason is not known right now, so, the proposal is to defer probe when the issue occurs. Change-Id: I6bb7624f649bdf5fd5663311fd25e3f1af518946 Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com> Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/168068 Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com> Reviewed-by: Fabrice GASNIER <fabrice.gasnier@st.com>
1 parent 5742265 commit b8663f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/usb/dwc2/platform.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,11 @@ static int dwc2_driver_probe(struct platform_device *dev)
450450
* reset value form registers.
451451
*/
452452
retval = dwc2_core_reset(hsotg, false);
453-
if (retval)
453+
if (retval) {
454+
/* TEMPORARY WORKAROUND */
455+
retval = -EPROBE_DEFER;
454456
goto error;
457+
}
455458

456459
/* Detect config values from hardware */
457460
retval = dwc2_get_hwparams(hsotg);

0 commit comments

Comments
 (0)