summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/socfpga/spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv7/socfpga/spl.c')
-rw-r--r--arch/arm/cpu/armv7/socfpga/spl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c
index 787ad7fb0d..756c55af91 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -15,6 +15,7 @@
#include <asm/arch/freeze_controller.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/scan_manager.h>
+#include <asm/arch/sdram.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -174,4 +175,16 @@ void spl_board_init(void)
/* enable console uart printing */
preloader_console_init();
+
+ if (sdram_mmr_init_full(0xffffffff) != 0) {
+ puts("SDRAM init failed.\n");
+ hang();
+ }
+
+ debug("SDRAM: Calibrating PHY\n");
+ /* SDRAM calibration */
+ if (sdram_calibration_full() == 0) {
+ puts("SDRAM calibration failed.\n");
+ hang();
+ }
}
OpenPOWER on IntegriCloud