]> git.sur5r.net Git - u-boot/commitdiff
mx6sxsabreauto: Avoid hardcoded RAM size
authorVanessa Maegima <vanessa.maegima@nxp.com>
Thu, 9 Jun 2016 18:28:32 +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>
board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
include/configs/mx6sxsabreauto.h

index 886373c901a492ac86740fd15cabf93c0409cbbb..44e6a7d14115558f5c305ce8d9c680e00cfdc6c5 100644 (file)
@@ -106,7 +106,7 @@ static int port_exp_direction_output(unsigned gpio, int value)
 
 int dram_init(void)
 {
-       gd->ram_size = PHYS_SDRAM_SIZE;
+       gd->ram_size = imx_ddr_size();
 
        return 0;
 }
index d771f9dbe87a143b837cc4028c00a71b2dbfde1f..439579dcda4f903a867d0cc995c07ec8080f20cf 100644 (file)
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS           1
 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE                        SZ_2G
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR