From: Rick Chen Date: Fri, 17 Jul 2020 08:24:44 +0000 (+0800) Subject: riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e8fa43182a487e7542c49408eb2499cc4c0ed53c;p=u-boot.git riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg Use fdtdec_get_addr_size_auto_noparent to read the "reg" property instead of fdtdec_get_addr. This will increase the compatibility of dtb parsing. Signed-off-by: Rick Chen Acked-by: Leo Liang Reviewed-by: Bin Meng Tested-by: Leo Liang --- diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c index add0d56ef2..59a43e4dcc 100644 --- a/board/AndesTech/ax25-ae350/ax25-ae350.c +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c @@ -71,7 +71,8 @@ int smc_init(void) if (node < 0) return -FDT_ERR_NOTFOUND; - addr = fdtdec_get_addr(blob, node, "reg"); + addr = fdtdec_get_addr_size_auto_noparent(blob, node, + "reg", 0, NULL, false); if (addr == FDT_ADDR_T_NONE) return -EINVAL;