summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-02-20 17:13:32 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-02-23 08:37:56 +0900
commit87c3308cbf969f2370a647c6beea26898f0767f8 (patch)
treea72a3383bd7cb0b9f18a49847903d8b2fabbec64 /arch/arm
parent0f5bf09cf1242246346ee47bd772c84ec3701f30 (diff)
ARM: uniphier: skip memreserve of unused DRAM bank of LD20
Now the "for" loop here iterates on the detected memory banks. It must skip unused DRAM banks. Fixes: c995f3a3c526 ("ARM: uniphier: use gd->bd->bi_dram for memory reserve on LD20 SoC") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-uniphier/dram_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index df0e73a941..b9b0cd65bd 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -256,6 +256,9 @@ int ft_board_setup(void *fdt, bd_t *bd)
return 0;
for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) {
+ if (!gd->bd->bi_dram[i].size)
+ continue;
+
rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size;
rsv_addr -= rsv_size;