summaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-07 05:27:26 +0300
committerTom Rini <trini@konsulko.com>2022-09-30 05:43:43 +0300
commit92291652b5741647919770c29cae8a2aac56b2bf (patch)
tree00a4c98a315009b10ac11079d52d70975d3caeef /doc/develop
parent41b65d68ec324d9c75dcfe6e1b34fef077b4b87a (diff)
downloadu-boot-92291652b5741647919770c29cae8a2aac56b2bf.tar.xz
dm: core: Add the ofnode multi-tree implementation
Add the logic to redirect requests for the device tree through a function which can look up the tree ID. This works by using the top bits of ofnode.of_offset to encode a tree. It is assumed that there will only be a few device trees used at runtime, typically the control FDT (always tree ID 0) and possibly a separate FDT to be passed the OS. The maximum number of device trees supported at runtime is 8, with this implementation. That would use bits 30:28 of the node-offset value, meaning that the positive offset range is limited to bits 27:0, versus 30:1 with this feature disabled. That still allows a device tree of up to 256MB, which should be enough for most FITs. Larger ones can be supported by using external data with the FIT, or by enabling OF_LIVE. Update the documentation a little and fix up the comment for ofnode_valid(). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/develop')
-rw-r--r--doc/develop/driver-model/livetree.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst
index 4ef8c51732..76be89b963 100644
--- a/doc/develop/driver-model/livetree.rst
+++ b/doc/develop/driver-model/livetree.rst
@@ -250,11 +250,14 @@ 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.
+oftree_default() but can be set to other values using oftree_from_fdt().
+So long as OF_LIVE is disabled, it is possible to do fixups using the ofnode
+interface. The OF_LIVE support required addition of the flattening step at the
+end.
+
+See dm_test_ofnode_root() for some examples. The ofnode_path_root() function
+causes a flat device tree to be 'registered' such that it can be used by the
+ofnode interface.
Internal implementation