diff options
author | Bin Meng <bin.meng@windriver.com> | 2020-05-19 23:38:33 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-06-11 20:52:11 -0600 |
commit | f6704c79946c15fe327ff44e50f9559cd559d7ef (patch) | |
tree | d4e12038ef47115cf8deb1923962b998358bdf61 /lib/fdtdec.c | |
parent | a9ad113df005b4ecd7b719736c228b1da69aa8d6 (diff) |
fdtdec: Honor #address-cells and #size-cells in fdtdec_add_reserved_memory()
At present fdtdec_add_reserved_memory() calls fdtdec_get_addr_size()
to get address and size for the subnodes of /reserved-memory node.
We should honor #address-cells and #size-cells properties in the
parent node.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r-- | lib/fdtdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 42f7a25505..0dd7ff1ac3 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1297,7 +1297,8 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename, fdt_addr_t addr; fdt_size_t size; - addr = fdtdec_get_addr_size(blob, node, "reg", &size); + addr = fdtdec_get_addr_size_fixed(blob, node, "reg", 0, na, ns, + &size, false); if (addr == FDT_ADDR_T_NONE) { debug("failed to read address/size for %s\n", name); continue; |