提交 5c6db120 编写于 作者: B Benoît Thébaudeau 提交者: Albert ARIBAUD

arm: Remove unused relocate_code() parameters

Commit e05e5de7 made the 2 1st parameters of
ARM's relocate_code() useless since it moved the code handling them to crt0.S.
So, drop these parameters.
Signed-off-by: NBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
上级 ac415a57
...@@ -174,15 +174,13 @@ next: ...@@ -174,15 +174,13 @@ next:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -241,15 +241,13 @@ skip_tcmdisable: ...@@ -241,15 +241,13 @@ skip_tcmdisable:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -156,15 +156,13 @@ reset: ...@@ -156,15 +156,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -195,15 +195,13 @@ copyex: ...@@ -195,15 +195,13 @@ copyex:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -185,15 +185,13 @@ poll1: ...@@ -185,15 +185,13 @@ poll1:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -191,15 +191,13 @@ reset: ...@@ -191,15 +191,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -160,15 +160,13 @@ reset: ...@@ -160,15 +160,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -156,15 +156,13 @@ reset: ...@@ -156,15 +156,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -165,14 +165,12 @@ reset: ...@@ -165,14 +165,12 @@ reset:
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_SPL_BUILD
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
ENTRY(relocate_code) ENTRY(relocate_code)
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -258,15 +258,13 @@ reset: ...@@ -258,15 +258,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -173,15 +173,13 @@ reset: ...@@ -173,15 +173,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_SPL_BUILD
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
/* Disable the Dcache RAM lock for stack now */ /* Disable the Dcache RAM lock for stack now */
#ifdef CONFIG_CPU_PXA25X #ifdef CONFIG_CPU_PXA25X
......
...@@ -141,15 +141,13 @@ reset: ...@@ -141,15 +141,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -145,15 +145,13 @@ reset: ...@@ -145,15 +145,13 @@ reset:
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
/* /*
* void relocate_code (addr_sp, gd, addr_moni) * void relocate_code(addr_moni)
* *
* This function relocates the monitor code. * This function relocates the monitor code.
*/ */
.globl relocate_code .globl relocate_code
relocate_code: relocate_code:
mov r4, r0 /* save addr_sp */ mov r6, r0 /* save addr of destination */
mov r5, r1 /* save addr of gd */
mov r6, r2 /* save addr of destination */
adr r0, _start adr r0, _start
subs r9, r6, r0 /* r9 <- relocation offset */ subs r9, r6, r0 /* r9 <- relocation offset */
......
...@@ -96,8 +96,8 @@ ENTRY(_main) ...@@ -96,8 +96,8 @@ ENTRY(_main)
/* /*
* Set up intermediate environment (new sp and gd) and call * Set up intermediate environment (new sp and gd) and call
* relocate_code(addr_sp, gd, addr_moni). Trick here is that * relocate_code(addr_moni). Trick here is that we'll return
* we'll return 'here' but relocated. * 'here' but relocated.
*/ */
ldr sp, [r8, #GD_START_ADDR_SP] /* r8 = gd->start_addr_sp */ ldr sp, [r8, #GD_START_ADDR_SP] /* r8 = gd->start_addr_sp */
...@@ -108,9 +108,7 @@ ENTRY(_main) ...@@ -108,9 +108,7 @@ ENTRY(_main)
adr lr, here adr lr, here
ldr r0, [r8, #GD_RELOC_OFF] /* lr = gd->start_addr_sp */ ldr r0, [r8, #GD_RELOC_OFF] /* lr = gd->start_addr_sp */
add lr, lr, r0 add lr, lr, r0
ldr r0, [r8, #GD_START_ADDR_SP] /* r0 = gd->start_addr_sp */ ldr r0, [r8, #GD_RELOCADDR] /* r0 = gd->relocaddr */
mov r1, r8 /* r1 = gd */
ldr r2, [r8, #GD_RELOCADDR] /* r2 = gd->relocaddr */
b relocate_code b relocate_code
here: here:
......
...@@ -39,7 +39,7 @@ DECLARE_GLOBAL_DATA_PTR; ...@@ -39,7 +39,7 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_SPL_BUILD
void board_init_f(ulong bootflag) void board_init_f(ulong bootflag)
{ {
relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE); relocate_code(CONFIG_SPL_TEXT_BASE);
asm volatile("ldr pc, =nand_boot"); asm volatile("ldr pc, =nand_boot");
} }
#endif #endif
......
...@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR; ...@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_SPL_BUILD
void board_init_f(ulong bootflag) void board_init_f(ulong bootflag)
{ {
relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE); relocate_code(CONFIG_SPL_TEXT_BASE);
asm volatile("ldr pc, =nand_boot"); asm volatile("ldr pc, =nand_boot");
} }
#endif #endif
......
...@@ -32,6 +32,5 @@ ...@@ -32,6 +32,5 @@
void board_init_f(unsigned long bootflag) void board_init_f(unsigned long bootflag)
{ {
relocate_code(CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL, relocate_code(CONFIG_SYS_TEXT_BASE);
CONFIG_SYS_TEXT_BASE);
} }
...@@ -530,11 +530,11 @@ int dcache_status (void); ...@@ -530,11 +530,11 @@ int dcache_status (void);
void dcache_enable (void); void dcache_enable (void);
void dcache_disable(void); void dcache_disable(void);
void mmu_disable(void); void mmu_disable(void);
void relocate_code(ulong, gd_t *, ulong) #if defined(CONFIG_ARM)
#if !defined(CONFIG_ARM) void relocate_code(ulong);
__attribute__ ((noreturn)) #else
void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
#endif #endif
;
ulong get_endaddr (void); ulong get_endaddr (void);
void trap_init (ulong); void trap_init (ulong);
#if defined (CONFIG_4xx) || \ #if defined (CONFIG_4xx) || \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册