diff options
author | Tom Rini <trini@konsulko.com> | 2015-10-03 10:48:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-03 10:48:06 -0400 |
commit | 996ec1dcc58a34b53891acde0ec5df9141b5fcc2 (patch) | |
tree | 3f4c64df2a05124c7204d781caa1b2c963b12ec8 /lib | |
parent | 97fec7105c6d31f52026921e669ec78e1b7ca623 (diff) | |
parent | cce573e8d806fd430e7584b36bce6d62ae0430e8 (diff) | |
download | talos-obmc-uboot-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.tar.gz talos-obmc-uboot-996ec1dcc58a34b53891acde0ec5df9141b5fcc2.zip |
Merge branch 'master' of git://git.denx.de/u-boot-fdt
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 9f0b65de38..1a86369934 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -149,7 +149,7 @@ fdt_addr_t fdtdec_get_addr_size_auto_parent(const void *blob, int parent, } ns = fdt_size_cells(blob, parent); - if (ns < 1) { + if (ns < 0) { debug("(bad #size-cells)\n"); return FDT_ADDR_T_NONE; } @@ -180,10 +180,11 @@ fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node, fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, const char *prop_name, fdt_size_t *sizep) { + int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0; + return fdtdec_get_addr_size_fixed(blob, node, prop_name, 0, sizeof(fdt_addr_t) / sizeof(fdt32_t), - sizeof(fdt_size_t) / sizeof(fdt32_t), - sizep); + ns, sizep); } fdt_addr_t fdtdec_get_addr(const void *blob, int node, |