1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 16:22:36 +02:00

riscv: fu540: Use correct API to get L2 cache controller base address

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.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@openfive.com>
This commit is contained in:
Bin Meng
2020-08-18 01:09:20 -07:00
committed by Andes
parent 1aa3966173
commit 52dc7ae749

View File

@@ -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;