am33xx: Convert to using <asm/emif.h> to describe the EMIF
[oweals/u-boot.git] / arch / arm / cpu / s3c44b0 / start.S
index 10f5284d457da053e83cd2f4577ac7c62fa3eb08..8daf26c4f033ddad242ee63876ca9f3bff7cbfb1 100644 (file)
@@ -167,7 +167,7 @@ copy_loop:
        cmp     r0, r2                  /* until source end address [r2]    */
        blo     copy_loop
 
-#ifndef CONFIG_PRELOADER
+#ifndef CONFIG_SPL_BUILD
        /*
         * fix .rel.dyn relocations
         */
@@ -209,7 +209,7 @@ fixnext:
 #endif
 
 clear_bss:
-#ifndef CONFIG_PRELOADER
+#ifndef CONFIG_SPL_BUILD
        ldr     r0, _bss_start_ofs
        ldr     r1, _bss_end_ofs
        mov     r4, r6                  /* reloc addr */
@@ -217,13 +217,15 @@ clear_bss:
        add     r1, r1, r4
        mov     r2, #0x00000000         /* clear                            */
 
-clbss_l:str    r2, [r0]                /* clear loop...                    */
+clbss_l:cmp    r0, r1                  /* clear loop... */
+       bhs     clbss_e                 /* if reached end of bss, exit */
+       str     r2, [r0]
        add     r0, r0, #4
-       cmp     r0, r1
-       bne     clbss_l
+       b       clbss_l
+clbss_e:
 
        bl coloured_LED_init
-       bl red_LED_on
+       bl red_led_on
 #endif
 
 /*