From: Marek Vasut Date: Tue, 29 May 2018 18:37:52 +0200 Subject: [U-Boot] [PATCH] ARM: socfpga: Pull DRAM size from DT Message-ID: <20180529163752.29289-1-marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Pull the DRAM size from DT instead of hardcoding it into U-Boot. Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen --- arch/arm/mach-socfpga/misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c index fca86507f1..bc6097cb1f 100644 --- a/arch/arm/mach-socfpga/misc.c +++ b/arch/arm/mach-socfpga/misc.c @@ -40,7 +40,9 @@ struct bsel bsel_str[] = { int dram_init(void) { - gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE); + if (fdtdec_setup_memory_size() != 0) + return -EINVAL; + return 0; } -- 2.17.0