[U-Boot] [PATCH 08/16] usb: dwc2: force reset assert before to probe the driver
Patrick Delaunay
patrick.delaunay at st.com
Fri Mar 29 14:42:16 UTC 2019
Reset the hardware to be sure of the device state.
Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---
drivers/usb/gadget/dwc2_udc_otg.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index af16fc1..8169fdb 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -1049,7 +1049,12 @@ static int dwc2_udc_otg_reset_init(struct udevice *dev,
if (ret)
return ret;
- ret = reset_deassert_bulk(resets);
+ ret = reset_assert_bulk(resets);
+
+ if (!ret) {
+ udelay(2);
+ ret = reset_deassert_bulk(resets);
+ }
if (ret) {
reset_release_bulk(resets);
return ret;
--
2.7.4
More information about the U-Boot
mailing list