]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/ppc4xx/start.S
powerpc: Use generic global_data
[u-boot] / arch / powerpc / cpu / ppc4xx / start.S
index aa03d9a770c17513170e32e81f8c655dd2b9c2a3..7aef43b210de25ca5ded376a399e1804ed758bbb 100644 (file)
@@ -68,7 +68,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <asm/ppc4xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
 #include <asm/mmu.h>
 #include <asm/ppc4xx-isram.h>
 
-#ifndef         CONFIG_IDENT_STRING
-#define         CONFIG_IDENT_STRING ""
-#endif
-
 #ifdef CONFIG_SYS_INIT_DCACHE_CS
 # if (CONFIG_SYS_INIT_DCACHE_CS == 0)
 #  define PBxAP PB1AP
        bl      reconfig_tlb0
 #endif
        GET_GOT
-#if defined(__pic__) && __pic__ == 1
-       /* Needed for upcoming -msingle-pic-base */
-       bl      _GLOBAL_OFFSET_TABLE_@local-4
-       mflr    r30
-#endif
        bl      cpu_init_f      /* run low-level CPU init code     (from Flash) */
        bl      board_init_f
        /* NOTREACHED - board_init_f() does not return */
@@ -554,9 +544,7 @@ tlbnx2:     addi    r4,r4,1         /* Next TLB */
        .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_of_vectors
@@ -804,11 +792,7 @@ _start:
        ori     r0,r0, RESET_VECTOR@l
        stwu    r1,-8(r1)               /* Save back chain and move SP */
        stw     r0,+12(r1)              /* Save return addr (underflow vect) */
-#if defined(__pic__) && __pic__ == 1
-       /* Needed for upcoming -msingle-pic-base */
-       bl      _GLOBAL_OFFSET_TABLE_@local-4
-       mflr    r30
-#endif
+
 #ifdef CONFIG_NAND_SPL
        bl      nand_boot_common        /* will not return */
 #else
@@ -821,118 +805,6 @@ _start:
 
 #endif /* CONFIG_440 */
 
-/*****************************************************************************/
-#ifdef CONFIG_IOP480
-       /*----------------------------------------------------------------------- */
-       /* Set up some machine state registers. */
-       /*----------------------------------------------------------------------- */
-       addi    r0,r0,0x0000            /* initialize r0 to zero */
-       mtspr   SPRN_ESR,r0             /* clear Exception Syndrome Reg */
-       mttcr   r0                      /* timer control register */
-       mtexier r0                      /* disable all interrupts */
-       addis   r4,r0,0xFFFF            /* set r4 to 0xFFFFFFFF (status in the */
-       ori     r4,r4,0xFFFF            /* dbsr is cleared by setting bits to 1) */
-       mtdbsr  r4                      /* clear/reset the dbsr */
-       mtexisr r4                      /* clear all pending interrupts */
-       addis   r4,r0,0x8000
-       mtexier r4                      /* enable critical exceptions */
-       addis   r4,r0,0x0000            /* assume 403GCX - enable core clk */
-       ori     r4,r4,0x4020            /* dbling (no harm done on GA and GC */
-       mtiocr  r4                      /* since bit not used) & DRC to latch */
-                                       /* data bus on rising edge of CAS */
-       /*----------------------------------------------------------------------- */
-       /* Clear XER. */
-       /*----------------------------------------------------------------------- */
-       mtxer   r0
-       /*----------------------------------------------------------------------- */
-       /* Invalidate i-cache and d-cache TAG arrays. */
-       /*----------------------------------------------------------------------- */
-       addi    r3,0,1024               /* 1/4 of I-cache size, half of D-cache */
-       addi    r4,0,1024               /* 1/4 of I-cache */
-..cloop:
-       iccci   0,r3
-       iccci   r4,r3
-       dccci   0,r3
-       addic.  r3,r3,-16               /* move back one cache line */
-       bne     ..cloop                 /* loop back to do rest until r3 = 0 */
-
-       /* */
-       /* initialize IOP480 so it can read 1 MB code area for SRAM spaces */
-       /* this requires enabling MA[17..0], by default only MA[12..0] are enabled. */
-       /* */
-
-       /* first copy IOP480 register base address into r3 */
-       addis   r3,0,0x5000             /* IOP480 register base address hi */
-/*     ori     r3,r3,0x0000            /  IOP480 register base address lo */
-
-#ifdef CONFIG_ADCIOP
-       /* use r4 as the working variable */
-       /* turn on CS3 (LOCCTL.7) */
-       lwz     r4,0x84(r3)             /* LOCTL is at offset 0x84 */
-       andi.   r4,r4,0xff7f            /* make bit 7 = 0 -- CS3 mode */
-       stw     r4,0x84(r3)             /* LOCTL is at offset 0x84 */
-#endif
-
-#ifdef CONFIG_DASA_SIM
-       /* use r4 as the working variable */
-       /* turn on MA17 (LOCCTL.7) */
-       lwz     r4,0x84(r3)             /* LOCTL is at offset 0x84 */
-       ori     r4,r4,0x80              /* make bit 7 = 1 -- MA17 mode */
-       stw     r4,0x84(r3)             /* LOCTL is at offset 0x84 */
-#endif
-
-       /* turn on MA16..13 (LCS0BRD.12 = 0) */
-       lwz     r4,0x100(r3)            /* LCS0BRD is at offset 0x100 */
-       andi.   r4,r4,0xefff            /* make bit 12 = 0 */
-       stw     r4,0x100(r3)            /* LCS0BRD is at offset 0x100 */
-
-       /* make sure above stores all comlete before going on */
-       sync
-
-       /* last thing, set local init status done bit (DEVINIT.31) */
-       lwz     r4,0x80(r3)             /* DEVINIT is at offset 0x80 */
-       oris    r4,r4,0x8000            /* make bit 31 = 1 */
-       stw     r4,0x80(r3)             /* DEVINIT is at offset 0x80 */
-
-       /* clear all pending interrupts and disable all interrupts */
-       li      r4,-1                   /* set p1 to 0xffffffff */
-       stw     r4,0x1b0(r3)            /* clear all pending interrupts */
-       stw     r4,0x1b8(r3)            /* clear all pending interrupts */
-       li      r4,0                    /* set r4 to 0 */
-       stw     r4,0x1b4(r3)            /* disable all interrupts */
-       stw     r4,0x1bc(r3)            /* disable all interrupts */
-
-       /* make sure above stores all comlete before going on */
-       sync
-
-       /* Set-up icache cacheability. */
-       lis     r1, CONFIG_SYS_ICACHE_SACR_VALUE@h
-       ori     r1, r1, CONFIG_SYS_ICACHE_SACR_VALUE@l
-       mticcr  r1
-       isync
-
-       /* Set-up dcache cacheability. */
-       lis     r1, CONFIG_SYS_DCACHE_SACR_VALUE@h
-       ori     r1, r1, CONFIG_SYS_DCACHE_SACR_VALUE@l
-       mtdccr  r1
-
-       addis   r1,r0,CONFIG_SYS_INIT_RAM_ADDR@h
-       ori     r1,r1,CONFIG_SYS_INIT_SP_OFFSET /* set up the stack to SDRAM */
-       li      r0, 0                   /* Make room for stack frame header and */
-       stwu    r0, -4(r1)              /* clear final stack frame so that      */
-       stwu    r0, -4(r1)              /* stack backtraces terminate cleanly   */
-
-       GET_GOT                 /* initialize GOT access                        */
-#if defined(__pic__) && __pic__ == 1
-       /* Needed for upcoming -msingle-pic-base */
-       bl      _GLOBAL_OFFSET_TABLE_@local-4
-       mflr    r30
-#endif
-       bl      board_init_f    /* run first part of init code (from Flash)     */
-       /* NOTREACHED - board_init_f() does not return */
-
-#endif /* CONFIG_IOP480 */
-
 /*****************************************************************************/
 #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
@@ -1192,11 +1064,6 @@ _start:
        stw     r0, +12(r1)             /* Save return addr (underflow vect) */
 #endif /* CONFIG_SYS_INIT_DCACHE_CS */
 
-#if defined(__pic__) && __pic__ == 1
-       /* Needed for upcoming -msingle-pic-base */
-       bl      _GLOBAL_OFFSET_TABLE_@local-4
-       mflr    r30
-#endif
 #ifdef CONFIG_NAND_SPL
        bl      nand_boot_common        /* will not return */
 #else