[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210430091512.1026996-1-hs@denx.de>
Date: Fri, 30 Apr 2021 11:15:12 +0200
From: Heiko Schocher <hs@...x.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Heiko Schocher <hs@...x.de>, Fabio Estevam <festevam@...il.com>,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
NXP Linux Team <linux-imx@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Teresa Remmet <t.remmet@...tec.de>,
Zhen Lei <thunder.leizhen@...wei.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: [PATCH] usb: dwc3: imx8mp: detect dwc3 child nodes with name "usb*"
commit:
d1689cd3c0f4: ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3")
renamed "dwc3@3*" nodes in imx8mp.dtsi to "usb@3*"
glue layer dwc3-imx8mp.c searches for "dwc3" and so drop failure
on boot:
imx8mp-dwc3 32f10100.usb: failed to find dwc3 core child
imx8mp-dwc3: probe of 32f10100.usb failed with error 1
imx8mp-dwc3 32f10108.usb: failed to find dwc3 core child
imx8mp-dwc3: probe of 32f10108.usb failed with error 1
now. Fix this (and allow old style too)
Tested on "PHYTEC phyBOARD-Pollux i.MX8MP" board.
fixes: d1689cd3c0f4: ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3")
Signed-off-by: Heiko Schocher <hs@...x.de>
---
drivers/usb/dwc3/dwc3-imx8mp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index b13cfab89d532..eb85ddc50f7c7 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -165,7 +165,8 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
if (err < 0)
goto disable_rpm;
- dwc3_np = of_get_child_by_name(node, "dwc3");
+ dwc3_np = of_get_child_by_name(node, "usb") ? :
+ of_get_child_by_name(node, "dwc3");
if (!dwc3_np) {
dev_err(dev, "failed to find dwc3 core child\n");
goto disable_rpm;
--
2.30.2
Powered by blists - more mailing lists