summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-06-24 14:56:15 -0700
committerAndes <uboot@andestech.com>2020-07-03 15:09:00 +0800
commitedf4fc2bafac18399d07152be51cb77d5d1bb3ac (patch)
tree6b3215b7bfe00d245d7d89ceac16c505ae9474e8 /arch
parent7eb4bcc3f49c4eb7b494766163a78909f2c1f379 (diff)
riscv: Use optimized version of fdtdec_get_addr_size_no_parent
fdtdec_get_addr_size_no_parent is not an optimized version if parent node is already available with the caller. Use fdtdec_get_addr_size_auto_parent to read the "reg" property Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Bin Meng <bin.meng@windriver.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/lib/fdt_fixup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
index bd4a3c993a..c7cb74e08a 100644
--- a/arch/riscv/lib/fdt_fixup.c
+++ b/arch/riscv/lib/fdt_fixup.c
@@ -56,9 +56,9 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst)
fdt_for_each_subnode(node, src, offset) {
name = fdt_get_name(src, node, NULL);
- addr = fdtdec_get_addr_size_auto_noparent(src, node,
- "reg", 0, &size,
- false);
+ addr = fdtdec_get_addr_size_auto_parent(src, offset, node,
+ "reg", 0, &size,
+ false);
if (addr == FDT_ADDR_T_NONE) {
debug("failed to read address/size for %s\n", name);
continue;