diff mbox series

[U-Boot,v2,11/14] usb: ehci-msm: Add init_after_reset for CI_UDC

Message ID 20180921103555.16240-12-ramon.fried@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Introduce fastboot support for dragonboard410c | expand

Commit Message

Ramon Fried Sept. 21, 2018, 10:35 a.m. UTC
MSM uses the chipidea controller IP, however it requires
to reinit the phy after controller reset. in EHCI mode there's a
dedicated callback for it.
In device mode however there's no such callback.
Add implementaion of ci_init_after_reset() to implement the above
requirement in case CI_UDC driver is used.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---

Changes in v2: None

 drivers/usb/host/ehci-msm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Tom Rini Sept. 30, 2018, 7:26 p.m. UTC | #1
On Fri, Sep 21, 2018 at 01:35:53PM +0300, Ramon Fried wrote:

> MSM uses the chipidea controller IP, however it requires
> to reinit the phy after controller reset. in EHCI mode there's a
> dedicated callback for it.
> In device mode however there's no such callback.
> Add implementaion of ci_init_after_reset() to implement the above
> requirement in case CI_UDC driver is used.
> 
> Signed-off-by: Ramon Fried <ramon.fried@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 00d6bb8231..5c257ccf4d 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -121,6 +121,18 @@  static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
 	return 0;
 }
 
+#if defined(CONFIG_CI_UDC)
+/* Little quirk that MSM needs with Chipidea controller
+ * Must reinit phy after reset
+ */
+void ci_init_after_reset(struct ehci_ctrl *ctrl)
+{
+	struct msm_ehci_priv *p = ctrl->priv;
+
+	generic_phy_reset(&p->phy);
+}
+#endif
+
 static const struct udevice_id ehci_usb_ids[] = {
 	{ .compatible = "qcom,ehci-host", },
 	{ }