diff mbox

[U-Boot,PATCHv2,14/20] arm: socfpga: add sdram stack to SPL

Message ID 1425313688-23595-15-git-send-email-dinguyen@opensource.altera.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Dinh Nguyen March 2, 2015, 4:28 p.m. UTC
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(+)

Comments

Marek Vasut March 4, 2015, 1:15 p.m. UTC | #1
On Monday, March 02, 2015 at 05:28:02 PM, dinguyen@opensource.altera.com wrote:
> 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>

Were you able to find out whether this is really needed for FATLOAD
in SPL please ? Is the FATload is demanding ?

Best regards,
Marek Vasut
diff mbox

Patch

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