summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-12-10 11:35:31 +0100
committerSeung-Woo Kim <sw0312.kim@samsung.com>2020-12-10 10:56:54 +0000
commit9e513e3e5e208b685fc89c13bf3b62bc02ea1686 (patch)
treed3e4cdb0433e31fd2c748786bfbd0cfde61f474e
parent9809b292e7c3de9639a8c3b545ff979881834c3a (diff)
downloadu-boot-9e513e3e5e208b685fc89c13bf3b62bc02ea1686.tar.gz
u-boot-9e513e3e5e208b685fc89c13bf3b62bc02ea1686.tar.bz2
u-boot-9e513e3e5e208b685fc89c13bf3b62bc02ea1686.zip
usb: dwc3-meson-g12a: always configure dr-mode
dwc3_meson_g12a_force_mode() sets the dr-mode of the USB PHY. However it skips setting the mode if it matches the one done during driver probe (stored in private structure). This fails if the mode has been changed to other value and then back to initial one. Fix this by configuring the dr-mode always, regadless of the one set at the driver probe). This fixes operation of USB gadget based drivers when they are initialized for the second time. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I5188ca7cccf8e9b05a6cae9fd2b6f9d55fc75cb7
-rw-r--r--drivers/usb/dwc3/dwc3-meson-g12a.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index 6567502cdd..6f0bac2a00 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -269,9 +269,6 @@ int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode)
if (!priv->phys[USB2_OTG_PHY].dev)
return -EINVAL;
- if (mode == priv->otg_mode)
- return 0;
-
if (mode == USB_DR_MODE_HOST)
debug("%s: switching to Host Mode\n", __func__);
else