]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - arch/arm/cpu/pxa/cache.c
CONFIG_SPL_SYS_[DI]CACHE_OFF: add
[thirdparty/u-boot.git] / arch / arm / cpu / pxa / cache.c
index 7aba112c714b61a7d40d2c0f5703f0fac990eace..5cd4a9524bc6527d8e530cebb9e21d555cb42347 100644 (file)
@@ -1,18 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016 Vasily Khoruzhick <anarsoul@gmail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <linux/types.h>
 #include <common.h>
 
-#ifndef CONFIG_SYS_DCACHE_OFF
-
-#ifndef CONFIG_SYS_CACHELINE_SIZE
-#define CONFIG_SYS_CACHELINE_SIZE      32
-#endif
-
+#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 void invalidate_dcache_all(void)
 {
        /* Flush/Invalidate I cache */
@@ -41,7 +35,7 @@ void flush_dcache_range(unsigned long start, unsigned long stop)
 {
        return invalidate_dcache_range(start, stop);
 }
-#else /* #ifndef CONFIG_SYS_DCACHE_OFF */
+#else /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
 void invalidate_dcache_all(void)
 {
 }
@@ -49,7 +43,7 @@ void invalidate_dcache_all(void)
 void flush_dcache_all(void)
 {
 }
-#endif /* #ifndef CONFIG_SYS_DCACHE_OFF */
+#endif /* #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) */
 
 /*
  * Stub implementations for l2 cache operations
@@ -57,6 +51,6 @@ void flush_dcache_all(void)
 
 __weak void l2_cache_disable(void) {}
 
-#if defined CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 __weak void invalidate_l2_cache(void) {}
 #endif