提交 e8fa4318 编写于 作者: R Rick Chen 提交者: Andes

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: NRick Chen <rick@andestech.com>
Acked-by: NLeo Liang <ycliang@andestech.com>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
Tested-by: NLeo Liang <ycliang@andestech.com>
上级 e491e15a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册