mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 20:54:24 +08:00
ARM: rmobile: salvator-x: Count all DRAM in all slots
Instead of counting only the DRAM in the first slot, count all the DRAM in all slots and report it accordingly. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
d1018f5f9f
commit
8f284e660b
@ -235,11 +235,39 @@ int board_mmc_init(bd_t *bis)
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
|
||||
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 2)
|
||||
gd->ram_size += PHYS_SDRAM_2_SIZE;
|
||||
#endif
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 3)
|
||||
gd->ram_size += PHYS_SDRAM_3_SIZE;
|
||||
#endif
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 4)
|
||||
gd->ram_size += PHYS_SDRAM_4_SIZE;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 2)
|
||||
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
|
||||
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
|
||||
#endif
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 3)
|
||||
gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
|
||||
gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
|
||||
#endif
|
||||
#if (CONFIG_NR_DRAM_BANKS >= 4)
|
||||
gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
|
||||
gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct rmobile_sysinfo sysinfo = {
|
||||
CONFIG_RCAR_BOARD_STRING
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user