dm: core: parse chosen node
This is the node that would contain, for example, the framebuffer setup
by an earlier stage.
Signed-off-by: Rob Clark <robdclark@gmail.com>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 976e2c4..36336b6 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -266,6 +266,17 @@
for (offset = fdt_first_subnode(blob, offset);
offset > 0;
offset = fdt_next_subnode(blob, offset)) {
+ /* "chosen" node isn't a device itself but may contain some: */
+ if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
+ pr_debug("parsing subnodes of \"chosen\"\n");
+
+ err = dm_scan_fdt_node(parent, blob, offset,
+ pre_reloc_only);
+ if (err && !ret)
+ ret = err;
+ continue;
+ }
+
if (pre_reloc_only &&
!dm_fdt_pre_reloc(blob, offset))
continue;