]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/cache.c
update to 2015.04-rc1
[karo-tx-uboot.git] / arch / arm / lib / cache.c
index c89e0f40c3f1985d0a5df3948428b024f6ca0c75..20c708a7c3edfe7239aa673205e61c65602031e8 100644 (file)
@@ -24,7 +24,8 @@ __weak void flush_cache(unsigned long start, unsigned long size)
 
 #endif /* CONFIG_CPU_ARM1136 */
 
-#ifdef CONFIG_ARM926EJS
+#ifdef CONFIG_CPU_ARM926EJS
+#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
        asm(
                /* test and clean, page 2-23 of arm926ejs manual */
                "0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n"
@@ -32,6 +33,7 @@ __weak void flush_cache(unsigned long start, unsigned long size)
                "mcr p15, 0, %0, c7, c10, 4" : : "r"(0) : "memory"
                );
 #endif
+#endif /* CONFIG_CPU_ARM926EJS */
        return;
 }