mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
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 <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>
This commit is contained in:
parent
e491e15a3f
commit
e8fa43182a
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue