]> git.sur5r.net Git - u-boot/commitdiff
mx6qsabreauto: Avoid hardcoded RAM size
authorVanessa Maegima <vanessa.maegima@nxp.com>
Wed, 8 Jun 2016 18:17:54 +0000 (15:17 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Jul 2016 15:58:48 +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>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
board/freescale/mx6qsabreauto/mx6qsabreauto.c
include/configs/mx6qsabreauto.h

index d63a979be5899d45c910fb24058e0e2ea95b827f..a3ed4cd466c77944254ada31c7604c2a34320523 100644 (file)
@@ -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;
 }
index 6039fc4f62e58d8df5ef6824d9dde207ccc9e19a..200e46836aa716306687911bf91deff6438f77ab 100644 (file)
@@ -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