public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size
@ 2016-06-08 18:17 Vanessa Maegima
  2016-06-08 18:42 ` Stefano Babic
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vanessa Maegima @ 2016-06-08 18:17 UTC (permalink / raw)
  To: u-boot

Instead of passing the total RAM size via PHYS_SDRAM_SIZE option,
we should better use imx_ddr_size() function, which automatically
determines the RAM size.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
---
 board/freescale/mx6qsabreauto/mx6qsabreauto.c | 2 +-
 include/configs/mx6qsabreauto.h               | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
index d63a979..a3ed4cd 100644
--- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
+++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
@@ -64,7 +64,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = imx_ddr_size();
 
 	return 0;
 }
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index 6039fc4..200e468 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -13,7 +13,6 @@
 #define CONFIG_MXC_UART_BASE	UART4_BASE
 #define CONFIG_CONSOLE_DEV		"ttymxc3"
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"
-#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
 
 /* USB Configs */
 #define CONFIG_USB_EHCI
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size
  2016-06-08 18:17 [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size Vanessa Maegima
@ 2016-06-08 18:42 ` Stefano Babic
  2016-06-08 20:48 ` Fabio Estevam
  2016-06-18  8:54 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-06-08 18:42 UTC (permalink / raw)
  To: u-boot

Hi Vanessa,

On 08/06/2016 20:17, Vanessa Maegima wrote:
> Instead of passing the total RAM size via PHYS_SDRAM_SIZE option,
> we should better use imx_ddr_size() function, which automatically
> determines the RAM size.
> 
> Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
> ---
>  board/freescale/mx6qsabreauto/mx6qsabreauto.c | 2 +-
>  include/configs/mx6qsabreauto.h               | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/board/freescale/mx6qsabreauto/mx6qsabreauto.c b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> index d63a979..a3ed4cd 100644
> --- a/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> +++ b/board/freescale/mx6qsabreauto/mx6qsabreauto.c
> @@ -64,7 +64,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  int dram_init(void)
>  {
> -	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
> +	gd->ram_size = imx_ddr_size();
>  

Right - this board was not yet updated.

>  	return 0;
>  }
> diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
> index 6039fc4..200e468 100644
> --- a/include/configs/mx6qsabreauto.h
> +++ b/include/configs/mx6qsabreauto.h
> @@ -13,7 +13,6 @@
>  #define CONFIG_MXC_UART_BASE	UART4_BASE
>  #define CONFIG_CONSOLE_DEV		"ttymxc3"
>  #define CONFIG_MMCROOT			"/dev/mmcblk0p2"
> -#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
>  
>  /* USB Configs */
>  #define CONFIG_USB_EHCI
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size
  2016-06-08 18:17 [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size Vanessa Maegima
  2016-06-08 18:42 ` Stefano Babic
@ 2016-06-08 20:48 ` Fabio Estevam
  2016-06-18  8:54 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2016-06-08 20:48 UTC (permalink / raw)
  To: u-boot

Hi Vanessa,

On Wed, Jun 8, 2016 at 3:17 PM, Vanessa Maegima <vanessa.maegima@nxp.com> wrote:
> Instead of passing the total RAM size via PHYS_SDRAM_SIZE option,
> we should better use imx_ddr_size() function, which automatically
> determines the RAM size.
>
> Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>

Thanks for the patch:

Acked-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size
  2016-06-08 18:17 [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size Vanessa Maegima
  2016-06-08 18:42 ` Stefano Babic
  2016-06-08 20:48 ` Fabio Estevam
@ 2016-06-18  8:54 ` Stefano Babic
  2 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-06-18  8:54 UTC (permalink / raw)
  To: u-boot

On 08/06/2016 20:17, Vanessa Maegima wrote:
> Instead of passing the total RAM size via PHYS_SDRAM_SIZE option,
> we should better use imx_ddr_size() function, which automatically
> determines the RAM size.
> 
> Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
> ---

Applied to -next, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-18  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 18:17 [U-Boot] [PATCH] mx6qsabreauto: Avoid hardcoded RAM size Vanessa Maegima
2016-06-08 18:42 ` Stefano Babic
2016-06-08 20:48 ` Fabio Estevam
2016-06-18  8:54 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox