[U-Boot] [PATCHv1 16/22] arm: socfpga: spl: add the stack in OCRAM

dinguyen at opensource.altera.com dinguyen at opensource.altera.com
Wed Jan 14 17:40:56 CET 2015


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

Allocate a stack in the OCRAM for the SPL to use.

Signed-off-by: Dinh Nguyen <dinguyen at 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 730d154..7c7f59c 100644
--- a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
+++ b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
@@ -44,4 +44,11 @@ SECTIONS
 		. = ALIGN(4);
 		__bss_end = .;
 	} >.sram
+
+	.stack :
+	{
+		. = . + CONFIG_SPL_STACK_SIZE;
+		. = ALIGN(8);
+		__stack_start = .;
+	} >.sram
 }
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 0c87faa..90ca031 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -305,6 +305,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SYS_SPL_MALLOC_START	CONFIG_SYS_INIT_SP_ADDR
 #define CONFIG_SYS_SPL_MALLOC_SIZE	(5 * 1024)
 #define CONFIG_SPL_MAX_SIZE		(64 * 1024)
+#define CONFIG_SPL_STACK_SIZE		0x1000
 
 #define CHUNKSZ_CRC32			(1 * 1024)	/* FIXME: ewww */
 #define CONFIG_CRC32_VERIFY
-- 
2.2.1



More information about the U-Boot mailing list