[U-Boot] [PATCH 1/3] nios2: remove CONFIG_SYS_MALLOC_BASE macro

Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by the generic board.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- include/configs/nios2-generic.h | 2 -- 1 file changed, 2 deletions(-)
diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 84faa4c..74c715d 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -84,8 +84,6 @@ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000) -#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \ - CONFIG_SYS_MALLOC_LEN) #define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE
/*

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(-)
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

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

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

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

As the generic board runs in cached mode, it should not use "stwio" which bypass the cache.
Signed-off-by: Thomas Chou thomas@wytron.com.tw --- arch/nios2/cpu/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index bb86bbf..54787c5 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -158,7 +158,7 @@ relocate_code: ori r6, r6, %lo(__bss_end) beq r5, r6, 5f
-4: stwio r0, 0(r5) +4: stw r0, 0(r5) addi r5, r5, 4 bne r5, r6, 4b 5:

On Tue, 2015-11-03 at 14:20 +0800, thomas@wytron.com.tw wrote:
As the generic board runs in cached mode, it should not use "stwio" which bypass the cache.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
Reviewed-by: Chin Liang See clsee@altera.com
Thanks Chin Liang

On 2015年11月03日 14:20, Thomas Chou wrote:
As the generic board runs in cached mode, it should not use "stwio" which bypass the cache.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
arch/nios2/cpu/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-nios.
diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index bb86bbf..54787c5 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -158,7 +158,7 @@ relocate_code: ori r6, r6, %lo(__bss_end) beq r5, r6, 5f
-4: stwio r0, 0(r5) +4: stw r0, 0(r5) addi r5, r5, 4 bne r5, r6, 4b 5:

On Tue, 2015-11-03 at 14:20 +0800, thomas@wytron.com.tw wrote:
Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by the generic board.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
Reviewed-by: Chin Liang See clsee@altera.com
Thanks Chin Liang

On 2015年11月03日 14:20, Thomas Chou wrote:
Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by the generic board.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
include/configs/nios2-generic.h | 2 -- 1 file changed, 2 deletions(-)
Applied to u-boot-nios.
diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 84faa4c..74c715d 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -84,8 +84,6 @@ CONFIG_SYS_SDRAM_SIZE - \ CONFIG_SYS_MONITOR_LEN) #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 0x20000) -#define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - \
CONFIG_SYS_MALLOC_LEN)
#define CONFIG_SYS_INIT_SP CONFIG_SYS_MALLOC_BASE
/*
participants (3)
-
Chin Liang See
-
Marek Vasut
-
Thomas Chou