diff options
| author | Simon Glass <[email protected]> | 2022-07-30 15:52:08 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-08-12 08:14:23 -0400 |
| commit | 331048471dee5c1d9cede54382256e6cfaee2370 (patch) | |
| tree | d12f08911b3f33b1da5ec9970ee1995aef23e6fe /include/dm/ofnode_decl.h | |
| parent | 72b338aa2cd4afff8e92ab28199bc2db073cfea7 (diff) | |
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 <[email protected]>
Diffstat (limited to 'include/dm/ofnode_decl.h')
| -rw-r--r-- | include/dm/ofnode_decl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dm/ofnode_decl.h b/include/dm/ofnode_decl.h index 7c9e43e4ad8..266253d5e33 100644 --- a/include/dm/ofnode_decl.h +++ b/include/dm/ofnode_decl.h @@ -68,5 +68,18 @@ struct ofprop { }; }; +/** + * union oftree_union - reference to a tree of device tree nodes + * + * One or other of the members is used, depending on of_live_active() + * + * @np: Pointer to roott device node, used for live tree + * @fdt: Pointer to the flat device tree, used for flat tree + */ +typedef union oftree_union { + struct device_node *np; + void *fdt; +} oftree; + #endif |
