dtc/libfdt
Thierry Reding 730875016a libfdt: Add phandle generation helper
The new fdt_generate_phandle() function can be used to generate a new,
unused phandle given a specific device tree blob. The implementation is
somewhat naive in that it simply walks the entire device tree to find
the highest phandle value and then returns a phandle value one higher
than that. A more clever implementation might try to find holes in the
current set of phandle values and fill them. But this implementation is
relatively simple and works reliably.

Also add a test that validates that phandles generated by this new API
are indeed unique.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Message-Id: <20190326153302.17109-3-thierry.reding@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-29 13:31: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: Add phandle generation helper 2019-03-29 13:31:16 +11:00
fdt_rw.c libfdt: Clean up header checking functions 2018-06-07 11:45:44 +10:00
fdt_strerror.c libfdt: add missing errors to fdt_strerror() 2016-11-04 07:17:20 +11:00
fdt_sw.c libfdt: Add necessary header padding in fdt_create() 2018-07-09 15:03:14 +10:00
fdt_wip.c libfdt: Remove leading underscores from identifiers 2017-10-26 09:25:14 +02:00
libfdt.h libfdt: Add phandle generation helper 2019-03-29 13:31:16 +11: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 Remove broken objdir / srcdir support 2018-11-23 21:58:42 +11:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
version.lds libfdt: Add phandle generation helper 2019-03-29 13:31:16 +11:00