diff mbox

[U-Boot,PATCHv1,11/22] arm: socfpga: spl: printout sdram size

Message ID 1421253662-27222-12-git-send-email-dinguyen@opensource.altera.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Dinh Nguyen Jan. 14, 2015, 4:40 p.m. UTC
From: Dinh Nguyen <dinguyen@opensource.altera.com>

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

Comments

Marek Vasut Jan. 14, 2015, 11:49 p.m. UTC | #1
On Wednesday, January 14, 2015 at 05:40:51 PM, dinguyen@opensource.altera.com 
wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> ---
>  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 9481fd5..16ca8b0 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 */
> @@ -185,4 +186,7 @@ void spl_board_init(void)
>  	/* SDRAM calibration */
>  	if (sdram_calibration_full() == 0)
>  		hang();
> +
> +	sdram_size = sdram_calculate_size();
> +	printf("SDRAM: %ld MiB\n", (sdram_size >> 20));

Hi!

This will be printed by the "big" U-Boot as well, so you might want to turn this 
into a debug() ?

>  }

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 9481fd5..16ca8b0 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 */
@@ -185,4 +186,7 @@  void spl_board_init(void)
 	/* SDRAM calibration */
 	if (sdram_calibration_full() == 0)
 		hang();
+
+	sdram_size = sdram_calculate_size();
+	printf("SDRAM: %ld MiB\n", (sdram_size >> 20));
 }