arm: Remove unused relocate_code() parameters
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Thu, 11 Apr 2013 09:35:53 +0000 (09:35 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 12 Apr 2013 05:55:07 +0000 (07:55 +0200)
Commit e05e5de7fae5bec79617e113916dac6631251156 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: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
18 files changed:
arch/arm/cpu/arm1136/start.S
arch/arm/cpu/arm1176/start.S
arch/arm/cpu/arm720t/start.S
arch/arm/cpu/arm920t/start.S
arch/arm/cpu/arm925t/start.S
arch/arm/cpu/arm926ejs/start.S
arch/arm/cpu/arm946es/start.S
arch/arm/cpu/arm_intcm/start.S
arch/arm/cpu/armv7/start.S
arch/arm/cpu/ixp/start.S
arch/arm/cpu/pxa/start.S
arch/arm/cpu/s3c44b0/start.S
arch/arm/cpu/sa1100/start.S
arch/arm/lib/crt0.S
board/freescale/mx31pdk/mx31pdk.c
board/karo/tx25/tx25.c
board/samsung/smdk6400/smdk6400_nand_spl.c
include/common.h

index e36d7d3..ad24b80 100644 (file)
@@ -174,15 +174,13 @@ next:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 0b570d5..5654c19 100644 (file)
@@ -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.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index a640eaa..9facc7e 100644 (file)
@@ -156,15 +156,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 940ce72..6250025 100644 (file)
@@ -195,15 +195,13 @@ copyex:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index ed683b4..021e241 100644 (file)
@@ -185,15 +185,13 @@ poll1:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 3c9de3f..4c56711 100644 (file)
@@ -191,15 +191,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 2dd1fa3..9c2b70d 100644 (file)
@@ -160,15 +160,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index cc054e8..5e8c528 100644 (file)
@@ -156,15 +156,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index d0b17c9..64008ba 100644 (file)
@@ -165,14 +165,12 @@ reset:
 
 #ifndef CONFIG_SPL_BUILD
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
 ENTRY(relocate_code)
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index a305ff5..69ef8aa 100644 (file)
@@ -258,15 +258,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index cd88af8..3e07c7c 100644 (file)
@@ -173,15 +173,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 #ifndef CONFIG_SPL_BUILD
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
 /* Disable the Dcache RAM lock for stack now */
 #ifdef CONFIG_CPU_PXA25X
index 579f6e2..7361aa2 100644 (file)
@@ -141,15 +141,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 13cf132..8a2eafd 100644 (file)
@@ -145,15 +145,13 @@ reset:
 /*------------------------------------------------------------------------------*/
 
 /*
- * void relocate_code (addr_sp, gd, addr_moni)
+ * void relocate_code(addr_moni)
  *
  * This function relocates the monitor code.
  */
        .globl  relocate_code
 relocate_code:
-       mov     r4, r0  /* save addr_sp */
-       mov     r5, r1  /* save addr of gd */
-       mov     r6, r2  /* save addr of destination */
+       mov     r6, r0  /* save addr of destination */
 
        adr     r0, _start
        subs    r9, r6, r0              /* r9 <- relocation offset */
index 1524f7e..fa25319 100644 (file)
@@ -96,8 +96,8 @@ ENTRY(_main)
 
 /*
  * Set up intermediate environment (new sp and gd) and call
- * relocate_code(addr_sp, gd, addr_moni). Trick here is that
- * we'll return 'here' but relocated.
+ * relocate_code(addr_moni). Trick here is that we'll return
+ * 'here' but relocated.
  */
 
        ldr     sp, [r8, #GD_START_ADDR_SP]     /* r8 = gd->start_addr_sp */
@@ -108,9 +108,7 @@ ENTRY(_main)
        adr     lr, here
        ldr     r0, [r8, #GD_RELOC_OFF]         /* lr = gd->start_addr_sp */
        add     lr, lr, r0
-       ldr     r0, [r8, #GD_START_ADDR_SP]     /* r0 = gd->start_addr_sp */
-       mov     r1, r8                          /* r1 = gd */
-       ldr     r2, [r8, #GD_RELOCADDR]         /* r2 = gd->relocaddr */
+       ldr     r0, [r8, #GD_RELOCADDR]         /* r0 = gd->relocaddr */
        b       relocate_code
 here:
 
index 3d0d419..49158bd 100644 (file)
@@ -39,7 +39,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_SPL_BUILD
 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");
 }
 #endif
index 69ee590..85719a0 100644 (file)
@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_SPL_BUILD
 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");
 }
 #endif
index a023284..26a6146 100644 (file)
@@ -32,6 +32,5 @@
 
 void board_init_f(unsigned long bootflag)
 {
-       relocate_code(CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
-                       CONFIG_SYS_TEXT_BASE);
+       relocate_code(CONFIG_SYS_TEXT_BASE);
 }
index 52df70c..604176c 100644 (file)
@@ -530,11 +530,11 @@ int       dcache_status (void);
 void   dcache_enable (void);
 void   dcache_disable(void);
 void   mmu_disable(void);
-void   relocate_code(ulong, gd_t *, ulong)
-#if !defined(CONFIG_ARM)
-__attribute__ ((noreturn))
+#if defined(CONFIG_ARM)
+void   relocate_code(ulong);
+#else
+void   relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 #endif
-;
 ulong  get_endaddr   (void);
 void   trap_init     (ulong);
 #if defined (CONFIG_4xx)       || \