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 838ac0f4c4eacb39defea2e8d946473b0ab81969..2f4679e211350b2a70d6bb6a0e305e3b4a32b9cd 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 0d1bd5412b166e37f04f7cf67197e668def35edb..3c4cf80b233f2f613b4e9a89a99ae6d3badb6f71 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;
 }