]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx6slevk: Avoid hardcoded RAM size
authorVanessa Maegima <vanessa.maegima@nxp.com>
Thu, 9 Jun 2016 18:28:31 +0000 (15:28 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Jul 2016 15:58:49 +0000 (17:58 +0200)
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>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
board/freescale/mx6slevk/mx6slevk.c
include/configs/mx6slevk.h

index 256d6029b4e6556ed13ad8f50312ccd7f445f1fa..f978e5044e94dcb08b3a42df8e80fb6ba3538fb8 100644 (file)
@@ -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;
 }
index d53e41653dd0dc153b1300826ac3acda09af256e..375aa0e5d6be97510f993c3ec0ecd37d5558d094 100644 (file)
 /* 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