dtc/libfdt
Nicholas Piggin fbb62754ce libfdt: Introduce fdt_create_with_flags()
There is a need to be able to specify some options when building an FDT
with the SW interface. This can be accomplished with minimal changes by
storing intermediate data in the fdt header itself, in fields that are
not otherwise needed during the creation process and can be set by
fdt_finish().

The fdt.magic field is already used exactly this way, as a state to
check with callers that the FDT has been created but not yet finished.

fdt.version and fdt.last_comp_version are used to make room for more
intermediate state. These are adjacent and unused during the building
process. last_comp_version is not yet used for intermediate state, but
it is zeroed and treated as used, so as to allow future growth easily.

A new interface, fdt_create_with_flags() is added, which takes 32-bit
flag value to control creation.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20190509094122.834-3-npiggin@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-05-10 11:53:10 +10:00
..
.gitignore Link tools and tests against libfdt shared library 2019-03-29 17:20:16 +11:00
fdt.c libfdt: Add fdt_header_size() 2018-06-07 11:49:14 +10:00
fdt.h libfdt: Remove leading underscores from identifiers 2017-10-26 09:25:14 +02:00
fdt_addresses.c libfdt: add fdt_append_addrrange() 2019-03-29 12:12:29 +11:00
fdt_empty_tree.c Fix a few whitespace and style nits 2017-04-09 20:56:37 +10:00
fdt_overlay.c libfdt: Use fdt_find_max_phandle() 2019-03-29 13:31:16 +11:00
fdt_ro.c libfdt: Make fdt_get_max_phandle() an inline 2019-03-29 13:59:04 +11:00
fdt_rw.c libfdt: Ensure fdt_add_property frees allocated name string on failure 2019-05-10 11:53:10 +10:00
fdt_strerror.c libfdt: Introduce fdt_create_with_flags() 2019-05-10 11:53:10 +10:00
fdt_sw.c libfdt: Introduce fdt_create_with_flags() 2019-05-10 11:53:10 +10:00
fdt_wip.c libfdt: Remove leading underscores from identifiers 2017-10-26 09:25:14 +02:00
libfdt.h libfdt: Introduce fdt_create_with_flags() 2019-05-10 11:53:10 +10:00
libfdt_env.h libfdt: Add new maximum phandle lookup function 2019-03-29 13:29:51 +11:00
libfdt_internal.h libfdt: Clean up header checking functions 2018-06-07 11:45:44 +10:00
Makefile.libfdt Link tools and tests against libfdt shared library 2019-03-29 17:20:16 +11:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
version.lds libfdt: Introduce fdt_create_with_flags() 2019-05-10 11:53:10 +10:00