From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 15 Jan 2015 01:04:30 +0100 Subject: [U-Boot] [PATCHv1 21/22] arm: socfpga: spl: Add SDRAM check In-Reply-To: <1421253662-27222-22-git-send-email-dinguyen@opensource.altera.com> References: <1421253662-27222-1-git-send-email-dinguyen@opensource.altera.com> <1421253662-27222-22-git-send-email-dinguyen@opensource.altera.com> Message-ID: <201501150104.30387.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:41:01 PM, dinguyen at opensource.altera.com wrote: > From: Dinh Nguyen > > Signed-off-by: Dinh Nguyen > --- > arch/arm/cpu/armv7/socfpga/spl.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/cpu/armv7/socfpga/spl.c > b/arch/arm/cpu/armv7/socfpga/spl.c index bf5b682..f0ef6b1 100644 > --- a/arch/arm/cpu/armv7/socfpga/spl.c > +++ b/arch/arm/cpu/armv7/socfpga/spl.c > @@ -191,4 +191,12 @@ void spl_board_init(void) > > sdram_size = sdram_calculate_size(); > printf("SDRAM: %ld MiB\n", (sdram_size >> 20)); > + > + /* Sanity check ensure correct SDRAM size specified */ > + puts("SDRAM: Ensuring specified SDRAM size is correct ..."); > + if (get_ram_size(0, sdram_size) != sdram_size) { > + puts("failed\n"); Hi, you might want to be more verbose about what failed here, possibly include __FILE__ , __func__ and __LINE__ to help identify the problem. Thanks! > + hang(); > + } > + puts("passed\n"); > } Best regards, Marek Vasut