mx7ulp_evk: Use imx_ddr_size()
authorFabio Estevam <festevam@gmail.com>
Thu, 18 Jul 2019 18:04:25 +0000 (15:04 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 14 Oct 2019 07:31:41 +0000 (09:31 +0200)
Use imx_ddr_size() to retrieve the total DDR size instead
of passing a hardcoded memory size.

imx_ddr_size() calculates the memory size based on the actual
MMDC registers values and is useful to detect misconfigurations,
so switch to this more robust approach.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
board/freescale/mx7ulp_evk/mx7ulp_evk.c

index 7527263577ff9f4bfd98606d36d002b02d45f1ea..c939514a5fc22ff11ff9d2e5bd3546c6de49a24c 100644 (file)
@@ -17,7 +17,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-       gd->ram_size = PHYS_SDRAM_SIZE;
+       gd->ram_size = imx_ddr_size();
 
        return 0;
 }