From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/2] usb: dwc3: am62: set mode valid bit before probing children
Date: Mon, 17 Feb 2025 15:45:43 +0100 [thread overview]
Message-ID: <20250217144543.1777605-2-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20250217144543.1777605-1-s.hauer@pengutronix.de>
We should fully configure the desired register settings before calling
of_platform_populate() to make sure they actually have an effect.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/dwc3/dwc3-am62.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index 7dac8981fb..848549fbf6 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -240,17 +240,17 @@ static int dwc3_ti_probe(struct device *dev)
clk_prepare_enable(am62->usb2_refclk);
+ /* Set mode valid bit to indicate role is valid */
+ reg = dwc3_ti_readl(am62, USBSS_MODE_CONTROL);
+ reg |= USBSS_MODE_VALID;
+ dwc3_ti_writel(am62, USBSS_MODE_CONTROL, reg);
+
ret = of_platform_populate(node, NULL, dev);
if (ret) {
dev_err_probe(dev, ret, "failed to create dwc3 core\n");
goto err_pm_disable;
}
- /* Set mode valid bit to indicate role is valid */
- reg = dwc3_ti_readl(am62, USBSS_MODE_CONTROL);
- reg |= USBSS_MODE_VALID;
- dwc3_ti_writel(am62, USBSS_MODE_CONTROL, reg);
-
return 0;
err_pm_disable:
--
2.39.5
next prev parent reply other threads:[~2025-02-17 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 14:45 [PATCH 1/2] usb: dwc3: am62: Use HZ_PER_KHZ Sascha Hauer
2025-02-17 14:45 ` Sascha Hauer [this message]
2025-02-18 14:05 ` Sascha Hauer
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=20250217144543.1777605-2-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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