mirror of https://github.com/armbian/build.git
rk322x: keep usb resets deasserted on exit
uboot default behaviour is the assert resets when it has to pass control to the kernel. This may cause compatibility issues if the kernel driver is not instructed to properly deassert the resets, so we change the uboot behaviour for dwc and ehci usb drivers to deassert reset on exit.
This commit is contained in:
parent
fa559a7c1d
commit
4b51f88e56
|
@ -46,7 +46,42 @@ index 8eed9e3a92..ffe503e5db 100644
|
||||||
+ reset-names = "ehci";
|
+ reset-names = "ehci";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
|
||||||
|
index 936e30438d..09d3805e78 100644
|
||||||
|
--- a/drivers/usb/host/dwc2.c
|
||||||
|
+++ b/drivers/usb/host/dwc2.c
|
||||||
|
@@ -1436,7 +1438,10 @@ static int dwc2_usb_remove(struct udevice *dev)
|
||||||
|
|
||||||
|
dwc2_uninit_common(priv->regs);
|
||||||
|
|
||||||
|
- reset_release_bulk(&priv->resets);
|
||||||
|
+ // Assert first and then leave the resets deasserted
|
||||||
|
+ reset_assert_bulk(&priv->resets);
|
||||||
|
+ reset_deassert_bulk(&priv->resets);
|
||||||
|
+
|
||||||
|
clk_disable_bulk(&priv->clks);
|
||||||
|
clk_release_bulk(&priv->clks);
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
|
||||||
|
index 936e30438d..09d3805e78 100644
|
||||||
|
--- a/drivers/usb/host/ehci-generic.c
|
||||||
|
+++ b/drivers/usb/host/ehci-generic.c
|
||||||
|
@@ -148,9 +148,9 @@ static int ehci_usb_remove(struct udevice *dev)
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
- ret = reset_release_bulk(&priv->resets);
|
||||||
|
- if (ret)
|
||||||
|
- return ret;
|
||||||
|
+ // Assert first and then leave the resets deasserted
|
||||||
|
+ reset_assert_bulk(&priv->resets);
|
||||||
|
+ reset_deassert_bulk(&priv->resets);
|
||||||
|
|
||||||
|
return clk_release_bulk(&priv->clocks);
|
||||||
|
}
|
||||||
--
|
--
|
||||||
2.34.1
|
2.34.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue