[PATCH v2 3/8] mach-snapdragon: of_fixup: skip disabled USB nodes

Caleb Connolly caleb.connolly at linaro.org
Fri Apr 11 14:47:40 CEST 2025


There's no need to waste time fixing up nodes that aren't used on this
device. Skip them.

Reviewed-by: Sumit Garg <sumit.garg at oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
Tested-by: Sumit Garg <sumit.garg at oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
---
 arch/arm/mach-snapdragon/of_fixup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-snapdragon/of_fixup.c b/arch/arm/mach-snapdragon/of_fixup.c
index 70399307bcbda1e067230f00af6ba859a98c7ac0..dcd09ee7cac3e02287647c9e6df5575651e18e85 100644
--- a/arch/arm/mach-snapdragon/of_fixup.c
+++ b/arch/arm/mach-snapdragon/of_fixup.c
@@ -107,9 +107,11 @@ static void fixup_usb_nodes(struct device_node *root)
 	struct device_node *glue_np = root;
 	int ret;
 
 	while ((glue_np = of_find_compatible_node(glue_np, NULL, "qcom,dwc3"))) {
-		ret = fixup_qcom_dwc3(glue_np);
+		if (!of_device_is_available(glue_np))
+			continue;
+		ret = fixup_qcom_dwc3(root, glue_np);
 		if (ret)
 			log_warning("Failed to fixup node %s: %d\n", glue_np->name, ret);
 	}
 }

-- 
2.49.0



More information about the U-Boot mailing list