Closed johnrclarke closed 5 years ago
Oops, that's been wrong for a long time. At first I thought this might be a spec error, but looks like this has always been wrong, even for actual IEEE1275 systems.
The fix looks fine, however I'll need a Signed-off-by line from you in order to apply it (see https://git.eclipse.org/r/Documentation/user-signedoffby.html for example).
Signed-off-by added. Thanks.
According to the device tree specification, the default value for
size-cells is 1, but fdt_size_cells() was returning 2 if this property
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.