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>
This commit is contained in:
Patrick Delaunay 2019-03-29 15:42:16 +01:00 committed by Marek Vasut
parent c791c8431c
commit c2c74f97af

View File

@ -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;