diff mbox

[U-Boot,2/3] nios2: remove CONFIG_SYS_INIT_SP macro

Message ID 1446531623-17267-2-git-send-email-thomas@wytron.com.tw
State Accepted, archived
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Nov. 3, 2015, 6:20 a.m. UTC
Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
below the u-boot code.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/nios2/cpu/start.S          | 3 +--
 include/configs/nios2-generic.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Marek Vasut Nov. 3, 2015, 3:25 p.m. UTC | #1
On Tuesday, November 03, 2015 at 07:20:22 AM, Thomas Chou wrote:
> Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
> below the u-boot code.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Chin Liang See Nov. 4, 2015, 2:32 p.m. UTC | #2
On Tue, 2015-11-03 at 14:20 +0800, thomas@wytron.com.tw wrote:
> Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
> below the u-boot code.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

Reviewed-by: Chin Liang See <clsee@altera.com>

Thanks
Chin Liang
Thomas Chou Nov. 6, 2015, 1:29 a.m. UTC | #3
On 2015年11月03日 14:20, Thomas Chou wrote:
> Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
> below the u-boot code.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>   arch/nios2/cpu/start.S          | 3 +--
>   include/configs/nios2-generic.h | 1 -
>   2 files changed, 1 insertion(+), 3 deletions(-)
>

Applied u-boot-nios.

> diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S
> index 8758e7e..bb86bbf 100644
> --- a/arch/nios2/cpu/start.S
> +++ b/arch/nios2/cpu/start.S
> @@ -81,6 +81,7 @@ _cur:	movhi	r5, %hi(_cur - _start)
>   	mov	r8, r4
>   	movhi	r5, %hi(_start)
>   	ori	r5, r5, %lo(_start)	/* r5 <- linked _start */
> +	mov	sp, r5		/* initial stack below u-boot code */
>   	beq	r4, r5, 3f
>
>   	movhi	r6, %hi(CONFIG_SYS_MONITOR_LEN)
> @@ -100,8 +101,6 @@ _cur:	movhi	r5, %hi(_cur - _start)
>   _reloc:
>
>   	/* STACK INIT -- zero top two words for call back chain. */
> -	movhi	sp, %hi(CONFIG_SYS_INIT_SP)
> -	ori	sp, sp, %lo(CONFIG_SYS_INIT_SP)
>   	addi	sp, sp, -8
>   	stw	r0, 0(sp)
>   	stw	r0, 4(sp)
> diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h
> index 74c715d..3a559f1 100644
> --- a/include/configs/nios2-generic.h
> +++ b/include/configs/nios2-generic.h
> @@ -84,7 +84,6 @@
>   					 CONFIG_SYS_SDRAM_SIZE - \
>   					 CONFIG_SYS_MONITOR_LEN)
>   #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 0x20000)
> -#define CONFIG_SYS_INIT_SP		CONFIG_SYS_MALLOC_BASE
>
>   /*
>    * MISC
>
diff mbox

Patch

diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S
index 8758e7e..bb86bbf 100644
--- a/arch/nios2/cpu/start.S
+++ b/arch/nios2/cpu/start.S
@@ -81,6 +81,7 @@  _cur:	movhi	r5, %hi(_cur - _start)
 	mov	r8, r4
 	movhi	r5, %hi(_start)
 	ori	r5, r5, %lo(_start)	/* r5 <- linked _start */
+	mov	sp, r5		/* initial stack below u-boot code */
 	beq	r4, r5, 3f
 
 	movhi	r6, %hi(CONFIG_SYS_MONITOR_LEN)
@@ -100,8 +101,6 @@  _cur:	movhi	r5, %hi(_cur - _start)
 _reloc:
 
 	/* STACK INIT -- zero top two words for call back chain. */
-	movhi	sp, %hi(CONFIG_SYS_INIT_SP)
-	ori	sp, sp, %lo(CONFIG_SYS_INIT_SP)
 	addi	sp, sp, -8
 	stw	r0, 0(sp)
 	stw	r0, 4(sp)
diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h
index 74c715d..3a559f1 100644
--- a/include/configs/nios2-generic.h
+++ b/include/configs/nios2-generic.h
@@ -84,7 +84,6 @@ 
 					 CONFIG_SYS_SDRAM_SIZE - \
 					 CONFIG_SYS_MONITOR_LEN)
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 0x20000)
-#define CONFIG_SYS_INIT_SP		CONFIG_SYS_MALLOC_BASE
 
 /*
  * MISC