riscv: fu540: Use correct API to get L2 cache controller base address
Subsystems (2)
PATCH 1/2 riscv: fu540: Use correct API to get L2 cache controller base address
From: Bin Meng <[email protected]>
At present fdtdec_get_addr() is used to get L2 cache controller base address. This only works for a fixed #address-cells and #size-cells. Change to use fdtdec_get_addr_size_auto_parent() instead.
---
arch/riscv/cpu/fu540/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/riscv/cpu/fu540/cache.c +2 -1
@@ -35,7 +35,8 @@ int cache_enable_ways(void)if (node <0 )return node; - base =fdtdec_get_addr (blob, node,"reg" ); + base =fdtdec_get_addr_size_auto_parent (blob,0 , node,"reg" ,0 , +NULL , false);if (base ==FDT_ADDR_T_NONE )return FDT_ADDR_T_NONE ;
Signature · 1 line
2.7.4
PATCH 2/2 ram: sifive: Fix compiler warnings for 32-bit
From: Bin Meng <[email protected]>
priv->info.size is of type 'size_t' but the length modifier is l. Fix this by casting priv->info.size. Note 'z' cannot be used as the modifier as SPL does not support that.
---
drivers/ram/sifive/fu540_ddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ram/sifive/fu540_ddr.c +2 -2
@@ -316,12 +316,12 @@ static int fu540_ddr_setup(struct udevice *dev) priv->info.size =get_ram_size ((long *)priv->info.base, ddr_size); -debug ("%s : %lx\n" , __func__, priv->info.size); +debug ("%s : %lx\n" , __func__, (uintptr_t )priv->info.size);/* check memory access for all memory */ if (priv->info.size != ddr_size) {printf ("DDR invalid size : 0x%lx, expected 0x%lx\n" , - priv->info.size, (uintptr_t )ddr_size); + (uintptr_t )priv->info.size, (uintptr_t )ddr_size);return -EINVAL ; }
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 ram: sifive: Fix compiler warnings for 32-bit
Quoted 12 lines
From: Bin Meng [mailto:bmeng.cn at gmail.com]
Sent: Tuesday, August 18, 2020 4:09 PM
To: Rick Jian-Zhi Chen(???); Pragnesh Patel; U-Boot Mailing List
Cc: Bin Meng
Subject: [PATCH 2/2] ram: sifive: Fix compiler warnings for 32-bitFrom: Bin Meng <[email protected]>
priv->info.sizeis of type 'size_t' but the length modifier is l. Fix this by castingpriv->info.size. Note 'z' cannot be used as the modifier as SPL does not support that.
Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>---
drivers/ram/sifive/fu540_ddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
PATCH 2/2 ram: sifive: Fix compiler warnings for 32-bit
In reply to Bin MengQuoted 17 lines
-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 18 August 2020 13:39
To: Rick Chen <[email protected]>; Pragnesh Patel <[email protected]>; U-Boot Mailing List <[email protected]>
Cc: Bin Meng <[email protected]>
Subject: [PATCH 2/2] ram: sifive: Fix compiler warnings for 32-bit[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe
From: Bin Meng <[email protected]>
priv->info.sizeis of type 'size_t' but the length modifier is l.
Fix this by castingpriv->info.size. Note 'z' cannot be used as the modifier as SPL does not support that.
Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>---
drivers/ram/sifive/fu540_ddr.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 riscv: fu540: Use correct API to get L2 cache controller base address
Quoted 12 lines
From: Bin Meng [mailto:bmeng.cn at gmail.com]
Sent: Tuesday, August 18, 2020 4:09 PM
To: Rick Jian-Zhi Chen(???); Pragnesh Patel; U-Boot Mailing List
Cc: Bin Meng
Subject: [PATCH 1/2] riscv: fu540: Use correct API to get L2 cache controller base addressFrom: Bin Meng <[email protected]>
At present
fdtdec_get_addr()is used to get L2 cache controller base address. This only works for a fixed #address-cells and #size-cells. Change to usefdtdec_get_addr_size_auto_parent()instead.
Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>---
arch/riscv/cpu/fu540/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
PATCH 1/2 riscv: fu540: Use correct API to get L2 cache controller base address
In reply to Bin MengQuoted 18 lines
-----Original Message-----
From: Bin Meng <[email protected]>
Sent: 18 August 2020 13:39
To: Rick Chen <[email protected]>; Pragnesh Patel <[email protected]>; U-Boot Mailing List <[email protected]>
Cc: Bin Meng <[email protected]>
Subject: [PATCH 1/2] riscv: fu540: Use correct API to get L2 cache controller base address[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe
From: Bin Meng <[email protected]>
At present
fdtdec_get_addr()is used to get L2 cache controller base address. This only works for a fixed #address-cells and #size-cells.
Change to usefdtdec_get_addr_size_auto_parent()instead.
Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>---
arch/riscv/cpu/fu540/cache.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)