Skip to contentSkip to conversation

riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg

PATCH New Andes 3 participants 4 messages Jul 17, 2020

lore
Share & tools
lore

Andes

author
#0 lore raw

PATCH 1/1 riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg

From: Rick Chen <[email protected]>

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.

---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/AndesTech/ax25-ae350/ax25-ae350.c +2 -1
index da5bc5b..231a0d5 100644
@@ -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;
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg

Quoted 28 lines · Open Source Project uboot

From: Rick Chen <[email protected]>

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.

---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
board/AndesTech/ax25-ae350/ax25-ae350.c +2 -1
index da5bc5b..231a0d5 100644
@@ -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;
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/1 riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg

In reply to Andes
Quoted 12 lines · Andes

From: Rick Chen <[email protected]>

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.

---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
#3 lore raw

PATCH 1/1 riscv: ae350: Use fdtdec_get_addr_size_auto_noparent to parse smc reg

Quoted 8 lines · Bin Meng
Quoted 7 lines · Andes

From: Rick Chen <[email protected]>

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.

Quoted 7 lines
Quoted 5 lines
---
 board/AndesTech/ax25-ae350/ax25-ae350.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)