summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:08 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:14:23 -0400
commit331048471dee5c1d9cede54382256e6cfaee2370 (patch)
treed12f08911b3f33b1da5ec9970ee1995aef23e6fe /lib
parent72b338aa2cd4afff8e92ab28199bc2db073cfea7 (diff)
downloadu-boot-331048471dee5c1d9cede54382256e6cfaee2370.tar.gz
u-boot-331048471dee5c1d9cede54382256e6cfaee2370.tar.bz2
u-boot-331048471dee5c1d9cede54382256e6cfaee2370.zip
dm: core: Introduce support for multiple trees
At present ofnode only works with a single device tree, for the most part. This is the control FDT used by U-Boot. When booting an OS we may obtain a different device tree and want to modify it. Add some initial support for this into the ofnode API. Note that we don't permit aliases in this other device tree, since the of_access implementation maintains a list of aliases collected at start-up. Also, we don't need aliases to do fixups in the other FDT. So make sure that flat tree and live tree processing are consistent in this area. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/of_live.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/of_live.c b/lib/of_live.c
index 2cb0dd9c07..30cae9ab88 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -248,19 +248,7 @@ static void *unflatten_dt_node(const void *blob, void *mem, int *poffset,
return mem;
}
-/**
- * unflatten_device_tree() - create tree of device_nodes from flat blob
- *
- * unflattens a device-tree, creating the
- * tree of struct device_node. It also fills the "name" and "type"
- * pointers of the nodes so the normal device-tree walking functions
- * can be used.
- * @blob: The blob to expand
- * @mynodes: The device_node tree created by the call
- * Return: 0 if OK, -ve on error
- */
-static int unflatten_device_tree(const void *blob,
- struct device_node **mynodes)
+int unflatten_device_tree(const void *blob, struct device_node **mynodes)
{
unsigned long size;
int start;