ddr: altera: stratix10: Move SDRAM size check to SDRAM driver

Move SDRAM size check to SDRAM driver. sdram_calculate_size()
is called in SDRAM initialization already, avoid calling
twice in size check function.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
This commit is contained in:
Ley Foon Tan
2019-03-22 01:24:00 +08:00
committed by Marek Vasut
parent c5de2b7eae
commit b6f7ee5d1f
2 changed files with 15 additions and 11 deletions

View File

@@ -181,17 +181,6 @@ void board_init_f(ulong dummy)
hang();
}
gd->ram_size = sdram_calculate_size();
printf("DDR: %d MiB\n", (int)(gd->ram_size >> 20));
/* Sanity check ensure correct SDRAM size specified */
debug("DDR: Running SDRAM size sanity check\n");
if (get_ram_size(0, gd->ram_size) != gd->ram_size) {
puts("DDR: SDRAM size check failed!\n");
hang();
}
debug("DDR: SDRAM size check passed!\n");
mbox_init();
#ifdef CONFIG_CADENCE_QSPI