]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ARM: uniphier: skip memreserve of unused DRAM bank of LD20
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 20 Feb 2017 08:13:32 +0000 (17:13 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 22 Feb 2017 23:37:56 +0000 (08:37 +0900)
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>
arch/arm/mach-uniphier/dram_init.c

index df0e73a941722495dc5c5f79f29f689393cc1539..b9b0cd65bdc2973dedbbd4b627daae339717db73 100644 (file)
@@ -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;