armv8: layerscape: Fix DDR size calcuation for SPL build
authorYork Sun <york.sun@nxp.com>
Thu, 20 Apr 2017 23:04:23 +0000 (16:04 -0700)
committerYork Sun <york.sun@nxp.com>
Mon, 24 Apr 2017 16:07:12 +0000 (09:07 -0700)
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
board/freescale/ls1046aqds/ddr.c
board/freescale/ls1046ardb/ddr.c

index 2643f5bf4aa2e604d193dc25a89fdfd3f4a308ce..b22d3784dce60dd2af32898bc664eb3e98c6e00a 100644 (file)
@@ -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");
 
index d37af34a9c95bcde2bc2b939009dcb317f3c5541..5fcfa0f701882f5a57c5357aec4021c84defa660 100644 (file)
@@ -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");
 
index a16f7bc83a91a0dcf2ae061051d6d5d059423cb4..ae5046cab6940563d4bf452701880d70dac9c38b 100644 (file)
@@ -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");