From: Vanessa Maegima Date: Thu, 9 Jun 2016 18:28:31 +0000 (-0300) Subject: mx6slevk: Avoid hardcoded RAM size X-Git-Tag: v2016.09-rc2~174^2~61 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8259e9c9adc263a3e9619bd4713dfddea19509b8;p=oweals%2Fu-boot.git mx6slevk: Avoid hardcoded RAM size 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 Reviewed-by: Fabio Estevam Reviewed-by: Fabio Estevam --- diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c index 256d6029b4..f978e5044e 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 d53e41653d..375aa0e5d6 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