From: Michal Simek Date: Wed, 11 Apr 2018 14:12:28 +0000 (+0200) Subject: arm: zynq: Wire automatic ddr detection for Zynq and ZynqMP case X-Git-Tag: v2018.05-rc3~44^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=61dc92a29d3028296dc3ff34641c78c402e8c14a;p=oweals%2Fu-boot.git arm: zynq: Wire automatic ddr detection for Zynq and ZynqMP case 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 --- diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c index 838ac0f4c4..2f4679e211 100644 --- a/board/xilinx/zynq/board.c +++ b/board/xilinx/zynq/board.c @@ -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(); diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 0d1bd5412b..3c4cf80b23 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -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; }