summaryrefslogtreecommitdiffstats
path: root/cpukit/automake
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-03-26 16:33:02 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-03-02 07:52:19 +0100
commit5a457750ec5b1916602da8f18565232916e9713e (patch)
treefcf2e1d19c37d768841192600144b232f466ba12 /cpukit/automake
parentlibfdt: Add new maximum phandle lookup function (diff)
downloadrtems-5a457750ec5b1916602da8f18565232916e9713e.tar.bz2
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>
Diffstat (limited to 'cpukit/automake')
0 files changed, 0 insertions, 0 deletions