]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: fu540: Use correct API to get L2 cache controller base address
authorBin Meng <bin.meng@windriver.com>
Tue, 18 Aug 2020 08:09:20 +0000 (01:09 -0700)
committerAndes <uboot@andestech.com>
Tue, 25 Aug 2020 01:33:16 +0000 (09:33 +0800)
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>
arch/riscv/cpu/fu540/cache.c

index 54de14238cc6ca6b5828325a82ae6d66e7fcf795..78f5ad9d602fef1fdae1a99c37d6b38c32eb28b7 100644 (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;