From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Tue, 31 Mar 2015 23:00:17 +0200 Subject: [U-Boot] [PATCHv3 07/17] arm: socfpga: spl: add sdram init and calibration In-Reply-To: <1427752878-18426-8-git-send-email-dinguyen@opensource.altera.com> References: <1427752878-18426-1-git-send-email-dinguyen@opensource.altera.com> <1427752878-18426-8-git-send-email-dinguyen@opensource.altera.com> Message-ID: <20150331210017.GC9785@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon 2015-03-30 17:01:08, 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 > --- > v3: Use debug instead of puts and add a newline for visual separation > v2: Add a fail message > --- > arch/arm/cpu/armv7/socfpga/spl.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c > index 787ad7f..128fe7c 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(); For consistency, you may want to add "." at end of message. > + } > + > + debug("SDRAM: Calibrating PHY\n"); > + /* SDRAM calibration */ > + if (sdram_calibration_full() == 0) { > + puts("SDRAM calibration failed!\n"); > + hang(); I'd change ! to . here, but... Reviewed-by: Pavel Machek Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html