u-boot/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.c scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
fdt.h scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
fdt_addresses.c scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110 2017-11-17 07:43:32 -05:00
fdt_empty_tree.c scripts/dtc: Update to upstream version v1.4.4-50-gfe50bd1ecc1d 2017-09-23 17:33:10 -04:00
fdt_overlay.c scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
fdt_ro.c libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
fdt_rw.c scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
fdt_strerror.c scripts/dtc: Update to upstream version v1.4.3 2017-09-23 17:33:03 -04:00
fdt_sw.c scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
fdt_wip.c scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
libfdt.h libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
libfdt_env.h libfdt: Add phandle generation helper 2019-04-11 20:10:50 -06:00
libfdt_internal.h scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987 2018-05-31 08:53:11 -04:00
Makefile.libfdt scripts/dtc: Update to upstream version v1.4.3 2017-09-23 17:33:03 -04:00