fix up fdtdec_get_addr_size to use fdtdec_get_addr_size_auto_noparent
so that the address cells and size cells are obtained from the
parent instead of going by the fixed length.

Signed-off-by: Keerthy <j-keer...@ti.com>
---
 lib/fdtdec.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 18663ce..11a30e1 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -178,11 +178,8 @@ 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),
-                                         ns, sizep, false);
+       return fdtdec_get_addr_size_auto_noparent(blob, node, prop_name, 0,
+                                                 sizep, false);
 }
 
 fdt_addr_t fdtdec_get_addr(const void *blob, int node, const char *prop_name)
-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to