Patchwork [U-Boot] arm: spl: Do not set the stack pointer twice

login
register
mail settings
Submitter Masahiro Yamada
Date July 17, 2013, 11:35 a.m.
Message ID <1374060955-13070-1-git-send-email-yamada.m@jp.panasonic.com>
Download mbox | patch
Permalink /patch/259689/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Masahiro Yamada - July 17, 2013, 11:35 a.m.
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.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
 arch/arm/lib/spl.c | 3 ---
 1 file changed, 3 deletions(-)
Albert ARIBAUD - Sept. 14, 2013, 9:42 a.m.
Hi Masahiro,

On Wed, 17 Jul 2013 20:35:55 +0900, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:

> 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.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
>  arch/arm/lib/spl.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
> index 301f082..b5a1324 100644
> --- a/arch/arm/lib/spl.c
> +++ b/arch/arm/lib/spl.c
> @@ -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,

Patch

diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 301f082..b5a1324 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -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);