diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-03-30 17:01:15 -0500 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-04-21 12:23:17 +0200 |
commit | 9ad3a4ace27fc4bd345214e4cb3788710b428db0 (patch) | |
tree | a141dc116d712cd892c475e7ea7925f460ffd2c8 | |
parent | 18ad2de4b289a413ba44d3e508cf6c6d483cdc6b (diff) | |
download | u-boot-imx-9ad3a4ace27fc4bd345214e4cb3788710b428db0.zip u-boot-imx-9ad3a4ace27fc4bd345214e4cb3788710b428db0.tar.gz u-boot-imx-9ad3a4ace27fc4bd345214e4cb3788710b428db0.tar.bz2 |
arm: socfpga: spl: Add SDRAM check
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
-rw-r--r-- | arch/arm/cpu/armv7/socfpga/spl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c index e7b4d29..d7cedad 100644 --- a/arch/arm/cpu/armv7/socfpga/spl.c +++ b/arch/arm/cpu/armv7/socfpga/spl.c @@ -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(); + } } |