]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
warp: Use imx_ddr_size() for calculating the DDR size
authorFabio Estevam <fabio.estevam@nxp.com>
Sat, 23 Jul 2016 16:23:38 +0000 (13:23 -0300)
committerStefano Babic <sbabic@denx.de>
Thu, 28 Jul 2016 11:27:20 +0000 (13:27 +0200)
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.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
board/warp/warp.c
include/configs/warp.h

index 49dfdb67174aaa99972ddba6a0de7c35f125fa06..0bc0a6a92e66d16e639f13c54803830f2fa2c8e2 100644 (file)
@@ -46,7 +46,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 4a8e270aeab64981c3fd654b8cf4876ba4711063..12c7c383c109f49853864f8afb721f42059f3c8e 100644 (file)
@@ -43,7 +43,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS           1
 #define PHYS_SDRAM                     MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE                        SZ_512M
 
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR