From: Tim Harvey <tharvey@gateworks.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de
Cc: Fabio Estevam <festevam@denx.de>, Adam Ford <aford173@gmail.com>,
Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH] usb: ehci-mx6: move phy setup before register access
Date: Fri, 28 Apr 2023 11:50:30 -0700 [thread overview]
Message-ID: <20230428185030.1345034-1-tharvey@gateworks.com> (raw)
For the CONFIG_PHY case, move the PHY setup before the register access.
This avoids a hang when updating the imx8mm.dtsi which moves the
USB OTG power-domains to the PHY.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Fabio Estevam <festevam@denx.de>
---
drivers/usb/host/ehci-mx6.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 91633f013a55..fae20838c60a 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -703,6 +703,10 @@ static int ehci_usb_probe(struct udevice *dev)
usb_internal_phy_clock_gate(priv->phy_addr, 1);
usb_phy_enable(ehci, priv->phy_addr);
#endif
+#else
+ ret = generic_setup_phy(dev, &priv->phy, 0);
+ if (ret)
+ goto err_regulator;
#endif
#if CONFIG_IS_ENABLED(DM_REGULATOR)
@@ -725,12 +729,6 @@ static int ehci_usb_probe(struct udevice *dev)
mdelay(10);
-#if defined(CONFIG_PHY)
- ret = generic_setup_phy(dev, &priv->phy, 0);
- if (ret)
- goto err_regulator;
-#endif
-
hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength);
hcor = (struct ehci_hcor *)((uintptr_t)hccr +
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
--
2.25.1
next reply other threads:[~2023-04-28 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 18:50 Tim Harvey [this message]
2023-05-02 12:47 ` [PATCH] usb: ehci-mx6: move phy setup before register access sbabic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230428185030.1345034-1-tharvey@gateworks.com \
--to=tharvey@gateworks.com \
--cc=aford173@gmail.com \
--cc=festevam@denx.de \
--cc=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox