summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamon Fried <ramon.fried@gmail.com>2018-09-21 13:35:53 +0300
committerTom Rini <trini@konsulko.com>2018-09-30 13:00:37 -0400
commit246670417cb6f7771f84ec960c0af471eadb6b4d (patch)
tree6fd09d262f63635ea114af4b10e35e8e14ce999c
parent816495299d1de613feea906389bf88c0faf29ebe (diff)
downloadu-boot-246670417cb6f7771f84ec960c0af471eadb6b4d.tar.gz
usb: ehci-msm: Add init_after_reset for CI_UDC
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>
-rw-r--r--drivers/usb/host/ehci-msm.c12
1 files changed, 12 insertions, 0 deletions
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", },
{ }