[U-Boot] armv8: layerscape: Fix DDR size calcuation for SPL build

Submitted by York Sun on April 20, 2017, 11:04 p.m.

Details

Message ID 1492729463-6349-1-git-send-email-york.sun@nxp.com
State Accepted
Delegated to: York Sun
Headers show

Commit Message

York Sun April 20, 2017, 11:04 p.m.
Commit 088454cd dropped return value from initram(), setting
gd->ram_size directly. Three boards were missed for SPL boot.

Signed-off-by: York Sun <york.sun@nxp.com>
---

 board/freescale/ls1043aqds/ddr.c | 4 +++-
 board/freescale/ls1046aqds/ddr.c | 4 +++-
 board/freescale/ls1046ardb/ddr.c | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

Comments

York Sun April 26, 2017, 10:23 p.m.
On 04/20/2017 04:04 PM, York Sun wrote:
> Commit 088454cd dropped return value from initram(), setting
> gd->ram_size directly. Three boards were missed for SPL boot.
>
> Signed-off-by: York Sun <york.sun@nxp.com>
> ---
>
>  board/freescale/ls1043aqds/ddr.c | 4 +++-
>  board/freescale/ls1046aqds/ddr.c | 4 +++-
>  board/freescale/ls1046ardb/ddr.c | 4 +++-
>  3 files changed, 9 insertions(+), 3 deletions(-)
>

Applied to fsl-qoriq master.

York

Patch hide | download patch | download mbox

diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index 2643f5b..b22d378 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -113,7 +113,9 @@  int fsl_initdram(void)
 	phys_size_t dram_size;
 
 #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
-	return fsl_ddr_sdram_size();
+	gd->ram_size = fsl_ddr_sdram_size();
+
+	return 0;
 #else
 	puts("Initializing DDR....using SPD\n");
 
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index d37af34..5fcfa0f 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -97,7 +97,9 @@  int fsl_initdram(void)
 	phys_size_t dram_size;
 
 #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
-	return fsl_ddr_sdram_size();
+	gd->ram_size = fsl_ddr_sdram_size();
+
+	return 0;
 #else
 	puts("Initializing DDR....using SPD\n");
 
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index a16f7bc..ae5046c 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -101,7 +101,9 @@  int fsl_initdram(void)
 	phys_size_t dram_size;
 
 #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
-	return fsl_ddr_sdram_size();
+	gd->ram_size = fsl_ddr_sdram_size();
+
+	return 0;
 #else
 	puts("Initializing DDR....using SPD\n");