Merge commit 'u-boot/master' into for-1.3.1
[oweals/u-boot.git] / cpu / lh7a40x / start.S
index 160f889df1eb22c16e4b23a44a3edf4e4d3091f6..fb748cffc63be59f34a57985fb46bda8d27b5718 100644 (file)
@@ -145,10 +145,11 @@ reset:
         * 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 */
@@ -166,6 +167,7 @@ copy_loop:
        cmp     r0, r2                  /* until source end addreee [r2]    */
        blt     copy_loop               /* a 'ble' here actually copies     */
                                        /*   four bytes of bss              */
+#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
 
        /* Set up the stack                                                 */
 stack_setup:
@@ -187,7 +189,7 @@ clear_bss:
 clbss_l:str    r2, [r0]                /* clear loop...                    */
        add     r0, r0, #4
        cmp     r0, r1
-       bne     clbss_l
+       ble     clbss_l
 
        ldr     pc, _start_armboot
 
@@ -229,10 +231,10 @@ cpu_init_crit:
        /*
         * before relocating, we have to setup RAM timing
         * because memory timing is board-dependend, you will
-        * find a memsetup.S in your board directory.
+        * find a lowlevel_init.S in your board directory.
         */
        mov     ip, lr
-       bl      memsetup
+       bl      lowlevel_init
        mov     lr, ip
 
        mov     pc, lr