diff mbox

[U-Boot,PATCHv2,09/20] arm: socfpga: spl: printout sdram size

Message ID 1425313688-23595-10-git-send-email-dinguyen@opensource.altera.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Dinh Nguyen March 2, 2015, 4:27 p.m. UTC
From: Dinh Nguyen <dinguyen@opensource.altera.com>

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
v2: Add a debug print
---
 arch/arm/cpu/armv7/socfpga/spl.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marek Vasut March 4, 2015, 12:48 p.m. UTC | #1
On Monday, March 02, 2015 at 05:27:57 PM, dinguyen@opensource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> ---
> v2: Add a debug print
> ---
>  arch/arm/cpu/armv7/socfpga/spl.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/socfpga/spl.c
> b/arch/arm/cpu/armv7/socfpga/spl.c index 71021f0..ea4a1fb 100644
> --- a/arch/arm/cpu/armv7/socfpga/spl.c
> +++ b/arch/arm/cpu/armv7/socfpga/spl.c
> @@ -55,6 +55,7 @@ u32 spl_boot_device(void)
>   */
>  void spl_board_init(void)
>  {
> +	unsigned long sdram_size;
>  #ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET
>  	cm_config_t cm_default_cfg = {
>  		/* main group */
> @@ -187,4 +188,7 @@ void spl_board_init(void)
>  		puts("SDRAM calibration failed!\n");
>  		hang();
>  	}
> +
> +	sdram_size = sdram_calculate_size();
> +	debug("SDRAM: %ld MiB\n", (sdram_size >> 20));

You don't need the inner brackets, they're redundant.

Otherwise:

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c
index 71021f0..ea4a1fb 100644
--- a/arch/arm/cpu/armv7/socfpga/spl.c
+++ b/arch/arm/cpu/armv7/socfpga/spl.c
@@ -55,6 +55,7 @@  u32 spl_boot_device(void)
  */
 void spl_board_init(void)
 {
+	unsigned long sdram_size;
 #ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET
 	cm_config_t cm_default_cfg = {
 		/* main group */
@@ -187,4 +188,7 @@  void spl_board_init(void)
 		puts("SDRAM calibration failed!\n");
 		hang();
 	}
+
+	sdram_size = sdram_calculate_size();
+	debug("SDRAM: %ld MiB\n", (sdram_size >> 20));
 }