/* If this function is not defined here, board.c alters dram bank zero configuration defined above.  */
int dram_init_banksize(void)
/* If this function is not defined here, board.c alters dram bank zero configuration defined above.  */
int dram_init_banksize(void)
{
	u64 size = 0;
	int i;
	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
		gd->bd->bi_dram[i].start = mvebu_sdram_bar(i);
		gd->bd->bi_dram[i].size = mvebu_sdram_bs(i);
		size += gd->bd->bi_dram[i].size;
		if (size > MVEBU_SDRAM_SIZE_MAX)
			mvebu_sdram_bs_set(i, 0x40000000);
	}
	return 0;
}