diff mbox series

[v2,03/12] usb: dwc3-generic: Add clock initialization in child DT node

Message ID 20230201011325.10679-4-hayashi.kunihiko@socionext.com
State Superseded
Delegated to: Bin Meng
Headers show
Series usb: dwc3: Refactor dwc3-generic and apply to dwc3-uniphier | expand

Commit Message

Kunihiko Hayashi Feb. 1, 2023, 1:13 a.m. UTC
Same as the reset cotnrol, should add a clock initialization in child DT
node, if the glue node doesn't have any clocks.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/usb/dwc3/dwc3-generic.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Marek Vasut Feb. 1, 2023, 9:50 p.m. UTC | #1
On 2/1/23 02:13, Kunihiko Hayashi wrote:
> Same as the reset cotnrol, should add a clock initialization in child DT
> node, if the glue node doesn't have any clocks.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

Reviewed-by: Marek Vasut <marex@denx.de>
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index e32003d68e..8fa56e1ac1 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -572,6 +572,12 @@  static int dwc3_glue_probe(struct udevice *dev)
 	if (ret)
 		return ret;
 
+	if (glue->clks.count == 0) {
+		ret = dwc3_glue_clk_init(child, glue);
+		if (ret)
+			return ret;
+	}
+
 	if (glue->resets.count == 0) {
 		ret = dwc3_glue_reset_init(child, glue);
 		if (ret)