]> git.dujemihanovic.xyz Git - u-boot.git/commit
libfdt: return correct value if #size-cells property is not present
authorMatthias Brugger <mbrugger@suse.com>
Thu, 5 Sep 2019 08:48:47 +0000 (10:48 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 15 Oct 2019 14:40:02 +0000 (08:40 -0600)
commit0ba41ce1b7816c229cc19e0621148b98f990cb68
tree449a98e679026e6eaa471331af17a1c0f12d0494
parentce2dae3a44ccc2fe87a9589e3a70ba51885930ab
libfdt: return correct value if #size-cells property is not present

According to the device tree specification, the default value for
was not present.

This patch also makes fdt_address_cells() and fdt_size_cells() conform
to the behaviour documented in libfdt.h. The defaults are only returned
if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error
is returned.

This is based on upstream commit:
aa7254d ("libfdt: return correct value if #size-cells property is not present")
but misses the test case part, as we don't implement them in U-Boot.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
scripts/dtc/libfdt/fdt_addresses.c
scripts/dtc/libfdt/libfdt.h