u-boot-brain/scripts/dtc/libfdt
Thierry Reding ea1df3e07c 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>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-04-11 20:10:50 -06:00
..
fdt_addresses.c
fdt_empty_tree.c
fdt_overlay.c
fdt_ro.c libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
fdt.c
fdt.h
libfdt_env.h libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
libfdt_internal.h
libfdt.h libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
Makefile.libfdt