From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 4 Mar 2015 13:45:20 +0100 Subject: [U-Boot] [PATCHv2 08/20] arm: socfpga: spl: add sdram init and calibration In-Reply-To: <1425313688-23595-9-git-send-email-dinguyen@opensource.altera.com> References: <1425313688-23595-1-git-send-email-dinguyen@opensource.altera.com> <1425313688-23595-9-git-send-email-dinguyen@opensource.altera.com> Message-ID: <201503041345.20130.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 Monday, March 02, 2015 at 05:27:56 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 > --- > v2: Add a fail message > --- > arch/arm/cpu/armv7/socfpga/spl.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm/cpu/armv7/socfpga/spl.c > b/arch/arm/cpu/armv7/socfpga/spl.c index 9ef2983..71021f0 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,15 @@ 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(); > + } > + puts("SDRAM: Calibrating PHY\n"); Hi! you might want to add newlines around the puts() above, to make the code visually separated. Also, the puts() above should probably be turned into debug(), since the user is most likely not interested to see such message upon each boot ... what do you think please ? > + /* SDRAM calibration */ > + if (sdram_calibration_full() == 0) { > + puts("SDRAM calibration failed!\n"); > + hang(); > + } > } Best regards, Marek Vasut