diff options
author | Patrick Delaunay | 2019-03-29 15:42:16 +0100 |
---|---|---|
committer | Marek Vasut | 2019-04-21 10:26:52 +0200 |
commit | c2c74f97afff9351077f2236ab6fa5638de9bd86 (patch) | |
tree | 39610aaf82b646de4bd4d36068f0e8c6b4ef23c1 /drivers/usb | |
parent | c791c8431c34da803fdac4a308999879a6a33834 (diff) |
usb: dwc2: force reset assert before to probe the driver
Reset the hardware to be sure of the device state.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/dwc2_udc_otg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index af16fc1ed4c..8169fdbb110 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; |