Skip to contentSkip to conversation

arm: spl: Do not set the stack pointer twice

PATCH New Masahiro Yamada 2 participants 2 messages Jul 17, 2013 – Sep 14, 2013 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: spl: Do not set the stack pointer twice

Because the stack pointer is already set in arch/arm/lib/crt0.S, we do not need to set it in arch/arm/lib/spl.c.

---
 arch/arm/lib/spl.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/lib/spl.c +0 -3
index 301f082..b5a1324 100644
@@ -41,9 +41,6 @@ gd_t gdata __attribute__ ((section(".data")));
  */
 void __weak board_init_f(ulong dummy)
 {
-	/* Set the stack pointer. */
-	asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK));
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 arm: spl: Do not set the stack pointer twice

Hi Masahiro,

Quoted 13 lines · Masahiro Yamada

Because the stack pointer is already set in arch/arm/lib/crt0.S, we do not need to set it in arch/arm/lib/spl.c.

---
 arch/arm/lib/spl.c | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/lib/spl.c +0 -0
index 301f082..b5a1324 100644

arch/arm/lib/spl.c gd_t gdata __attribute__ ((section(".data"))); · line 46

Quoted 9 lines
arch/arm/lib/spl.c +0 -3
@@ -41,9 +41,6 @@ gd_t gdata __attribute__ ((section(".data")));
  */
 void __weak board_init_f(ulong dummy)
 {
-	/* Set the stack pointer. */
-	asm volatile("mov sp, %0\n" : : "r"(CONFIG_SPL_STACK));
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 

Applied to u-boot-arm/master, thanks!

Amicalement,

Signature · 1 line
Albert.