From: Patrick Delaunay Date: Fri, 29 Mar 2019 14:42:16 +0000 (+0100) Subject: usb: dwc2: force reset assert before to probe the driver X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=c2c74f97afff9351077f2236ab6fa5638de9bd86;p=u-boot.git 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 Reviewed-by: Lukasz Majewski --- diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index af16fc1ed4..8169fdbb11 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;