From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 15 Jan 2015 00:47:59 +0100 Subject: [U-Boot] [PATCHv1 10/22] arm: socfpga: spl: add sdram init and calibration In-Reply-To: <1421253662-27222-11-git-send-email-dinguyen@opensource.altera.com> References: <1421253662-27222-1-git-send-email-dinguyen@opensource.altera.com> <1421253662-27222-11-git-send-email-dinguyen@opensource.altera.com> Message-ID: <201501150047.59796.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday, January 14, 2015 at 05:40:50 PM, dinguyen at opensource.altera.com wrote: > From: Dinh Nguyen > > Add a call to checkboard along with sdram intilialization and calibration. > > Signed-off-by: Dinh Nguyen > --- > 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 > #include > #include > +#include > > 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(); You might want to print some debug output in case this fails, to inform the user that things have gone awry. Please correct me if the sdram_mmr_init_full() already does print it. Thanks! > + puts("SDRAM: Calibrating PHY\n"); > + /* SDRAM calibration */ > + if (sdram_calibration_full() == 0) > + hang(); > } Best regards, Marek Vasut