diff options
author | Rob Clark | 2018-01-10 11:33:30 +0100 |
---|---|---|
committer | Tom Rini | 2018-01-15 11:35:38 -0500 |
commit | f2006808f099465707c8a815dd1d0ec093f3449b (patch) | |
tree | 9c10c354b33fcfc98895cd471e8f8ddfdd660914 /drivers/core/root.c | |
parent | 42091fa9e8147d536591f5c7abae12fd58b0d4c1 (diff) |
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>
Diffstat (limited to 'drivers/core/root.c')
-rw-r--r-- | drivers/core/root.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c index 976e2c4fdd9..36336b65b6c 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -266,6 +266,17 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob, 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; |