From 9df731a176aab8e03b984b681b1bea01ccff6644 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 06 Nov 2023 07:23:06 +0000
Subject: [PATCH] rk3568 rt uboot init

---
 u-boot/drivers/core/root.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/u-boot/drivers/core/root.c b/u-boot/drivers/core/root.c
index c928256..0eb2fa9 100644
--- a/u-boot/drivers/core/root.c
+++ b/u-boot/drivers/core/root.c
@@ -224,12 +224,8 @@
 
 	for (np = node_parent->child; np; np = np->sibling) {
 		if (pre_reloc_only &&
-#ifdef CONFIG_USING_KERNEL_DTB
-		    (!of_find_property(np, "u-boot,dm-pre-reloc", NULL) &&
-		     !of_find_property(np, "u-boot,dm-spl", NULL)))
-#else
-		     !of_find_property(np, "u-boot,dm-pre-reloc", NULL))
-#endif
+		   (!of_find_property(np, "u-boot,dm-pre-reloc", NULL) &&
+		    !of_find_property(np, "u-boot,dm-spl", NULL)))
 			continue;
 		if (!of_device_is_available(np)) {
 			pr_debug("   - ignoring disabled device\n");
@@ -272,7 +268,6 @@
 			    int offset, bool pre_reloc_only)
 {
 	int ret = 0, err;
-	const char *name;
 
 	for (offset = fdt_first_subnode(blob, offset);
 	     offset > 0;
@@ -291,11 +286,15 @@
 			      ret);
 		}
 
+#if CONFIG_IS_ENABLED(SCMI_FIRMWARE)
+		const char *name;
+
 		/* There is no compatible in "/firmware", bind it by default. */
 		name = fdt_get_name(blob, offset, NULL);
 		if (name && !strcmp(name, "firmware"))
 			ret = device_bind_driver_to_node(parent, "firmware",
 					name, offset_to_ofnode(offset), NULL);
+#endif
 	}
 
 	if (ret)

--
Gitblit v1.6.2