From 6e1551a870d360805b9d172dc56d935064abe71d Mon Sep 17 00:00:00 2001 From: Andrew Dyer Date: Fri, 12 Sep 2008 02:20:46 +0200 Subject: arm920t fix constant error in start.S Code in cpu/arm920t/start.S will die with a compilation error if CONFIG_STACKSIZE + CFG_MALLOC_LEN works out to an invalid constant for the ARM sub instruction. Change the code so that each is subtracted independently to avoid the error. Signed-off-by: Andrew Dyer --- cpu/arm920t/start.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cpu/arm920t/start.S') diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 62231f8..5d0fec6 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -315,7 +315,8 @@ cpu_init_crit: sub sp, sp, #S_FRAME_SIZE stmia sp, {r0 - r12} @ Calling r0-r12 ldr r2, _armboot_start - sub r2, r2, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN) + sub r2, r2, #(CONFIG_STACKSIZE) + sub r2, r2, #(CFG_MALLOC_LEN) sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort stack ldmia r2, {r2 - r3} @ get pc, cpsr add r0, sp, #S_FRAME_SIZE @ restore sp_SVC @@ -348,7 +349,8 @@ cpu_init_crit: .macro get_bad_stack ldr r13, _armboot_start @ setup our mode stack - sub r13, r13, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN) + sub r13, r13, #(CONFIG_STACKSIZE) + sub r13, r13, #(CFG_MALLOC_LEN) sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack str lr, [r13] @ save caller lr / spsr -- cgit v1.1 From 6d0f6bcf337c5261c08fabe12982178c2c489d76 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 16 Oct 2008 15:01:15 +0200 Subject: rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/arm920t/start.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cpu/arm920t/start.S') diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 5d0fec6..17977c2 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -202,8 +202,8 @@ copy_loop: /* Set up the stack */ stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ - sub r0, r0, #CFG_MALLOC_LEN /* malloc area */ - sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */ + sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ + sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ #ifdef CONFIG_USE_IRQ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif @@ -316,8 +316,8 @@ cpu_init_crit: stmia sp, {r0 - r12} @ Calling r0-r12 ldr r2, _armboot_start sub r2, r2, #(CONFIG_STACKSIZE) - sub r2, r2, #(CFG_MALLOC_LEN) - sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort stack + sub r2, r2, #(CONFIG_SYS_MALLOC_LEN) + sub r2, r2, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ set base 2 words into abort stack ldmia r2, {r2 - r3} @ get pc, cpsr add r0, sp, #S_FRAME_SIZE @ restore sp_SVC @@ -350,8 +350,8 @@ cpu_init_crit: .macro get_bad_stack ldr r13, _armboot_start @ setup our mode stack sub r13, r13, #(CONFIG_STACKSIZE) - sub r13, r13, #(CFG_MALLOC_LEN) - sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack + sub r13, r13, #(CONFIG_SYS_MALLOC_LEN) + sub r13, r13, #(CONFIG_SYS_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack str lr, [r13] @ save caller lr / spsr mrs lr, spsr -- cgit v1.1 From 8052352f20b33bef8f9872fc983eac73d4693c38 Mon Sep 17 00:00:00 2001 From: Jens Scharsig Date: Tue, 18 Nov 2008 10:48:46 +0100 Subject: at91rm9200: fix broken boot from nor flash This patch fix the broken boot from NOR Flash on AT91RM9200 boards, if CONFIG_AT91RM9200 is defined and nor preloader is used. Signed-off-by: Jens Scharsig --- cpu/arm920t/start.S | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cpu/arm920t/start.S') diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 17977c2..f99d129 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -24,7 +24,6 @@ * MA 02111-1307 USA */ - #include #include #include @@ -178,8 +177,6 @@ copyex: bl cpu_init_crit #endif -#ifndef CONFIG_AT91RM9200 - #ifndef CONFIG_SKIP_RELOCATE_UBOOT relocate: /* relocate U-Boot to RAM */ adr r0, _start /* r0 <- current position of code */ @@ -198,7 +195,7 @@ copy_loop: cmp r0, r2 /* until source end addreee [r2] */ ble copy_loop #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ -#endif + /* Set up the stack */ stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ -- cgit v1.1 From 58c696eed839af894e0265064669c402dc28b371 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 24 Nov 2008 21:50:59 +0100 Subject: AT91RM9200DK: fix broken boot from NOR flash Signed-off-by: Wolfgang Denk --- cpu/arm920t/start.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpu/arm920t/start.S') diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index f99d129..5143cfc 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -258,7 +258,7 @@ cpu_init_crit: * find a lowlevel_init.S in your board directory. */ mov ip, lr -#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF) +#if defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF) #else bl lowlevel_init -- cgit v1.1 From ed3b18e05c9a8ffa5fb643da9bcec7452e5d5e01 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 30 Nov 2008 19:36:50 +0100 Subject: AT91: remove non supported board AT91RM9200DF macro Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- cpu/arm920t/start.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu/arm920t/start.S') diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 5143cfc..fbcfe6d 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -118,7 +118,7 @@ start_code: bl coloured_LED_init bl red_LED_on -#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF) +#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) /* * relocate exception table */ @@ -258,7 +258,7 @@ cpu_init_crit: * find a lowlevel_init.S in your board directory. */ mov ip, lr -#if defined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF) +#if defined(CONFIG_AT91RM9200EK) #else bl lowlevel_init -- cgit v1.1