diff mbox

[U-Boot,v2,1/3] mx6slevk: Avoid hardcoded RAM size

Message ID 1465496913-19741-1-git-send-email-vanessa.maegima@nxp.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Vanessa Maegima June 9, 2016, 6:28 p.m. UTC
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>
---
Changes since v1:
- None

 board/freescale/mx6slevk/mx6slevk.c | 2 +-
 include/configs/mx6slevk.h          | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Fabio Estevam June 9, 2016, 6:32 p.m. UTC | #1
On Thu, Jun 9, 2016 at 3:28 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>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Fabio Estevam June 9, 2016, 6:32 p.m. UTC | #2
On Thu, Jun 9, 2016 at 3:28 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>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Stefano Babic June 18, 2016, 8:55 a.m. UTC | #3
On 09/06/2016 20:28, 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>
> ---


For the series:

Applied to -next, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 256d602..f978e50 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -61,7 +61,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/mx6slevk.h b/include/configs/mx6slevk.h
index d53e416..375aa0e 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -137,7 +137,6 @@ 
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			SZ_1G
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR