diff options
author | Simon Glass <sjg@chromium.org> | 2022-07-30 15:52:08 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 08:14:23 -0400 |
commit | 331048471dee5c1d9cede54382256e6cfaee2370 (patch) | |
tree | d12f08911b3f33b1da5ec9970ee1995aef23e6fe /doc | |
parent | 72b338aa2cd4afff8e92ab28199bc2db073cfea7 (diff) | |
download | u-boot-331048471dee5c1d9cede54382256e6cfaee2370.zip u-boot-331048471dee5c1d9cede54382256e6cfaee2370.tar.gz u-boot-331048471dee5c1d9cede54382256e6cfaee2370.tar.bz2 |
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 'doc')
-rw-r--r-- | doc/develop/driver-model/livetree.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst index fb29692..c29f29b 100644 --- a/doc/develop/driver-model/livetree.rst +++ b/doc/develop/driver-model/livetree.rst @@ -225,6 +225,23 @@ freed. Then the tree can be scanned for these 'separately allocated' nodes and properties before freeing the memory block. +Multiple livetrees +------------------ + +The livetree implementation was originally designed for use with the control +FDT. This means that the FDT fix-ups (ft_board_setup() and the like, must use +a flat tree. + +It would be helpful to use livetree for fixups, since adding a lot of nodes and +properties would involve less memory copying and be more efficient. As a step +towards this, an `oftree` type has been introduced. It is normally set to +oftree_default() but can be set to other values. Eventually this should allow +the use of FDT fixups using the ofnode interface, instead of the low-level +libfdt one. + +See dm_test_ofnode_root() for some examples. + + Internal implementation ----------------------- |