[U-Boot] [PATCHv1 18/22] arm: socfpga: add sdram stack to SPL

dinguyen at opensource.altera.com
2015-01-14T16:40:58Z

From: Dinh Nguyen <dinguyen@opensource.altera.com>

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 <dinguyen@opensource.altera.com>
---
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 6bcb013..4b98378 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -322,6 +322,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