]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc5xx/start.S
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
[u-boot] / arch / powerpc / cpu / mpc5xx / start.S
index 0af879e39130577fa757ab065f0acd28f327f472..1b275c66a1d894f4d031b37092876d2813b29b26 100644 (file)
@@ -30,9 +30,9 @@
  *
  */
 
+#include <asm-offsets.h>
 #include <config.h>
 #include <mpc5xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define CONFIG_5xx 1           /* needed for Linux kernel header files */
 
 #include <linux/config.h>
 #include <asm/processor.h>
-
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
+#include <asm/u-boot.h>
 
 /* We don't have a MMU.
 */
@@ -68,7 +65,7 @@
        GOT_ENTRY(transfer_to_handler)
 
        GOT_ENTRY(__init_end)
-       GOT_ENTRY(_end)
+       GOT_ENTRY(__bss_end)
        GOT_ENTRY(__bss_start)
        END_GOT
 
@@ -80,9 +77,7 @@
        .long   0x27051956                      /* U-Boot Magic Number */
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
@@ -91,18 +86,6 @@ _start:
        li      r4, CONFIG_SYS_ISB                      /* Set ISB bit */
        or      r3, r3, r4
        mtspr   638, r3
-       li      r21, BOOTFLAG_COLD              /* Normal Power-On: Boot from FLASH     */
-       b       boot_cold
-
-       . = EXC_OFF_SYS_RESET + 0x20
-
-       .globl  _start_warm
-_start_warm:
-       li      r21, BOOTFLAG_WARM              /* Software reboot */
-       b       boot_warm
-
-boot_cold:
-boot_warm:
 
        /* Initialize machine status; enable machine check interrupt            */
        /*----------------------------------------------------------------------*/
@@ -188,10 +171,10 @@ in_flash:
        /* r3: IMMR */
        bl      cpu_init_f      /* run low-level CPU init code     (from Flash) */
 
-       mr      r3, r21
-       /* r3: BOOTFLAG */
        bl      board_init_f    /* run 1st part of board init code (from Flash) */
 
+       /* NOTREACHED - board_init_f() does not return */
+
 
        .globl  _start_of_vectors
 _start_of_vectors:
@@ -464,17 +447,19 @@ in_ram:
        beq     4f
 3:     lwzu    r4,4(r3)
        lwzux   r0,r4,r11
+       cmpwi   r0,0
        add     r0,r0,r11
-       stw     r10,0(r3)
+       stw     r4,0(r3)
+       beq-    5f
        stw     r0,0(r4)
-       bdnz    3b
+5:     bdnz    3b
 4:
 clear_bss:
        /*
         * Now clear BSS segment
         */
        lwz     r3,GOT(__bss_start)
-       lwz     r4,GOT(_end)
+       lwz     r4,GOT(__bss_end)
        cmplw   0, r3, r4
        beq     6f