]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg
authorRick Chen <rick@andestech.com>
Fri, 17 Jul 2020 08:24:44 +0000 (16:24 +0800)
committerAndes <uboot@andestech.com>
Fri, 24 Jul 2020 06:56:24 +0000 (14:56 +0800)
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 <rick@andestech.com>
Acked-by: Leo Liang <ycliang@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Leo Liang <ycliang@andestech.com>
board/AndesTech/ax25-ae350/ax25-ae350.c

index add0d56ef2d4280e3301281f0d968bc2e166fda0..59a43e4dcc4d7683c0bdad0d22aff944f9d94e55 100644 (file)
@@ -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;