arm: zynq: Wire automatic ddr detection for Zynq and ZynqMP case
authorMichal Simek <michal.simek@xilinx.com>
Wed, 11 Apr 2018 14:12:28 +0000 (16:12 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 23 Apr 2018 11:15:32 +0000 (13:15 +0200)
When static memory configuration is used U-Boot has capability to detect
memory size in setup range. Enable this feature for static
configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c

index 838ac0f..2f4679e 100644 (file)
@@ -184,7 +184,8 @@ int dram_init(void)
 #else
 int dram_init(void)
 {
-       gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+       gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+                                   CONFIG_SYS_SDRAM_SIZE);
 
        zynq_ddrc_init();
 
index 0d1bd54..3c4cf80 100644 (file)
@@ -377,7 +377,8 @@ int dram_init(void)
 #else
 int dram_init(void)
 {
-       gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+       gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+                                   CONFIG_SYS_SDRAM_SIZE);
 
        return 0;
 }