Skip to contentSkip to conversation

dm: core: Deal with __symbols__ in devicetree

PATCH In review Simon Glass 1 participant 2 messages Jul 12, 2023 – Jul 24, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: core: Deal with __symbols__ in devicetree

This node is 'special' and doesn't have a compatible string. Deal with it is as a special case.

---

 drivers/core/root.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/core/root.c +4 -0
index 6775fb0b657..bf163cc16a9 100644
@@ -13,6 +13,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <spl.h>
 #include <asm-generic/sections.h>
 #include <asm/global_data.h>
 #include <linux/libfdt.h>
@@ -285,6 +286,9 @@ static int dm_scan_fdt_node(struct udevice *parent, ofnode parent_node,
 			pr_debug("   - ignoring disabled device\n");
 			continue;
 		}
+		if (spl_phase() > PHASE_SPL &&
+		    !strcmp("__symbols__", node_name))
+			continue;
 		err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
 		if (err && !ret) {
 			ret = err;
Signature · 1 line
2.41.0.255.g8b1d071c50-goog
#1 lore raw

Hi,

Quoted 34 lines · Simon Glass

This node is 'special' and doesn't have a compatible string. Deal with it is as a special case.

---

 drivers/core/root.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/core/root.c +4 -1
index 6775fb0b657..bf163cc16a9 100644
@@ -13,6 +13,7 @@
 #include <fdtdec.h>
 #include <log.h>
 #include <malloc.h>
+#include <spl.h>
 #include <asm-generic/sections.h>
 #include <asm/global_data.h>
 #include <linux/libfdt.h>
@@ -285,6 +286,9 @@ static int dm_scan_fdt_node(struct udevice *parent, ofnode parent_node,
                        pr_debug("   - ignoring disabled device\n");
                        continue;
                }
+               if (spl_phase() > PHASE_SPL &&
+                   !strcmp("__symbols__", node_name))
+                       continue;
                err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
                if (err && !ret) {
                        ret = err;
--
Quoted 2 lines

2.41.0.255.g8b1d071c50-goog

Does this fix the problem that was reported?

Regards,
Simon