From: Dinh Nguyen Date: Mon, 30 Mar 2015 22:01:08 +0000 (-0500) Subject: arm: socfpga: spl: add sdram init and calibration X-Git-Tag: v2015.07-rc1~61^2~14 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37ef0c70d32c8115bbbb508680fcb65004849126;p=u-boot arm: socfpga: spl: add sdram init and calibration Add a call to checkboard along with sdram intilialization and calibration. Signed-off-by: Dinh Nguyen --- 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 #include #include +#include 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(); + } }