From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Sat, 23 Jul 2016 16:23:40 +0000 (-0300)
Subject: bx50v3: Use imx_ddr_size() for calculating the DDR size
X-Git-Tag: v2025.01-rc5-pxa1908~8857^2~6
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=c6a51bab174ecb4c6bebfada951ac556ffc13fcd;p=u-boot.git

bx50v3: Use imx_ddr_size() for calculating the DDR size

imx_ddr_size() can be used to calculate the DDR size in runtime.

By using this function we no longer need to define PHYS_SDRAM_SIZE.

Cc: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---

diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index d45ed44c68..e9729f88e5 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -60,7 +60,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/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index 4de2460bc0..7a54546f83 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -32,8 +32,6 @@
 #define CONFIG_MXC_UART_BASE	UART3_BASE
 #define CONFIG_CONSOLE_DEV	"ttymxc2"
 
-#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
-
 #define CONFIG_SUPPORT_EMMC_BOOT