ARM (ARM11): add data cache support, test on Qong board
[platform/kernel/u-boot.git] / arch / arm / cpu / arm1136 / start.S
index 922d01c..1c58abd 100644 (file)
@@ -185,6 +185,7 @@ stack_setup:
 #endif
        sub     sp, r0, #12             /* leave 3 words for abort-stack    */
 #endif /* CONFIG_PRELOADER */
+       bic     sp, sp, #7              /* 8-byte alignment for ABI compliance */
 
 clear_bss:
        ldr     r0, _bss_start          /* find start of bss segment        */
@@ -438,6 +439,11 @@ fiq:
        .align 5
 .global arm1136_cache_flush
 arm1136_cache_flush:
+#if !defined(CONFIG_SYS_NO_ICACHE)
                mcr     p15, 0, r1, c7, c5, 0   @ invalidate I cache
+#endif
+#if !defined(CONFIG_SYS_NO_DCACHE)
+               mcr     p15, 0, r1, c7, c14, 0  @ invalidate D cache
+#endif
                mov     pc, lr                  @ back to caller
 #endif /* CONFIG_PRELOADER */