]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - cpu/arm925t/start.S
Update of new NAND code
[karo-tx-uboot.git] / cpu / arm925t / start.S
index da84de19bd37832cec28ab25acdc56f3e15e9ed2..238925936eaf60b2a07895748aae7f61b33b806d 100644 (file)
@@ -164,10 +164,11 @@ poll1:
         * we do sys-critical inits only at reboot,
         * not when booting from ram!
         */
-#ifdef CONFIG_INIT_CRITICAL
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
        bl  cpu_init_crit
 #endif
 
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
 relocate:                              /* relocate U-Boot to RAM           */
        adr     r0, _start              /* r0 <- current position of code   */
        ldr     r1, _TEXT_BASE          /* test if we run from flash or RAM */
@@ -184,6 +185,7 @@ copy_loop:
        stmia   r1!, {r3-r10}           /* copy to   target address [r1]    */
        cmp     r0, r2                  /* until source end addreee [r2]    */
        ble     copy_loop
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
 
        /* Set up the stack                                                 */
 stack_setup:
@@ -197,14 +199,13 @@ stack_setup:
 
 clear_bss:
        ldr     r0, _bss_start          /* find start of bss segment        */
-       add     r0, r0, #4              /* start at first byte of bss       */
        ldr     r1, _bss_end            /* stop here                        */
        mov     r2, #0x00000000         /* clear                            */
 
 clbss_l:str    r2, [r0]                /* clear loop...                    */
        add     r0, r0, #4
        cmp     r0, r1
-       bne     clbss_l
+       ble     clbss_l
 
        ldr     pc, _start_armboot