]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
SMDKV310: use get_ram_size() to validate dram size
authorChander Kashyap <chander.kashyap@linaro.org>
Tue, 20 Sep 2011 21:25:02 +0000 (21:25 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 3 Nov 2011 21:56:20 +0000 (22:56 +0100)
smdkv310.c: in dram_init_banksize(void) function dram size was
initialized without validation. get_ram_size() function will
validate the bank size before initialization.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/smdkv310/smdkv310.c

index 4478b0b3e501de76a1a487c3c7e21b5e133cc4cd..d9caca7f185fdcbdfd9b06f0e2962ddbb84f68d0 100644 (file)
@@ -74,13 +74,17 @@ int dram_init(void)
 void dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+       gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \
+                                                       PHYS_SDRAM_1_SIZE);
        gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
-       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+       gd->bd->bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \
+                                                       PHYS_SDRAM_2_SIZE);
        gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
-       gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
+       gd->bd->bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, \
+                                                       PHYS_SDRAM_3_SIZE);
        gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
-       gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
+       gd->bd->bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, \
+                                                       PHYS_SDRAM_4_SIZE);
 }
 
 int board_eth_init(bd_t *bis)