arm: socfpga: spl: Add SDRAM check

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
This commit is contained in:
Dinh Nguyen 2015-03-30 17:01:15 -05:00 committed by Marek Vasut
parent 18ad2de4b2
commit 9ad3a4ace2
1 changed files with 6 additions and 0 deletions
arch/arm/cpu/armv7/socfpga

View File

@ -191,4 +191,10 @@ void spl_board_init(void)
sdram_size = sdram_calculate_size();
debug("SDRAM: %ld MiB\n", sdram_size >> 20);
/* Sanity check ensure correct SDRAM size specified */
if (get_ram_size(0, sdram_size) != sdram_size) {
puts("SDRAM size check failed!\n");
hang();
}
}