From 61dc92a29d3028296dc3ff34641c78c402e8c14a Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 11 Apr 2018 16:12:28 +0200 Subject: [PATCH] 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 --- board/xilinx/zynq/board.c | 3 ++- board/xilinx/zynqmp/zynqmp.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.25.1