From: Dinh Nguyen <[email protected]>

Add a stack in the SDRAM to be able to use SPL_FAT_LOAD in later
stages of the SPL.

Signed-off-by: Dinh Nguyen <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/u-boot-spl.lds | 7 +++++++
 include/configs/socfpga_common.h          | 1 +
 2 files changed, 8 insertions(+)

diff --git a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds 
b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
index 7c7f59c..739f3f1 100644
--- a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
+++ b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
@@ -51,4 +51,11 @@ SECTIONS
                . = ALIGN(8);
                __stack_start = .;
        } >.sram
+
+       .sdram_stack :
+       {
+               __sdram_stack_end = .;
+               . = . + CONFIG_SPL_SDRAM_STACK_SIZE;
+               __sdram_stack_start = .;
+       } >.sdram
 }
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 042c65f..43f20c9 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -312,6 +312,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * Stack setup
  */
 #define CONFIG_SPL_STACK               CONFIG_SYS_INIT_SP_ADDR
+#define CONFIG_SPL_SDRAM_STACK_SIZE    (128 * 1024)
 
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_PARTITIONS
-- 
2.2.1

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to