[U-Boot] [PATCHv1 10/22] arm: socfpga: spl: add sdram init and calibration

dinguyen at opensource.altera.com dinguyen at opensource.altera.com
Wed Jan 14 17:40:50 CET 2015


From: Dinh Nguyen <dinguyen at opensource.altera.com>

Add a call to checkboard along with sdram intilialization and calibration.

Signed-off-by: Dinh Nguyen <dinguyen at opensource.altera.com>
---
 arch/arm/cpu/armv7/socfpga/spl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c
index 9ef2983..9481fd5 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -16,6 +16,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;
 
@@ -175,4 +176,13 @@ void spl_board_init(void)
 
 	/* enable console uart printing */
 	preloader_console_init();
+
+	checkboard();
+
+	if (sdram_mmr_init_full(0xffffffff) != 0)
+		hang();
+	puts("SDRAM: Calibrating PHY\n");
+	/* SDRAM calibration */
+	if (sdram_calibration_full() == 0)
+		hang();
 }
-- 
2.2.1



More information about the U-Boot mailing list