diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/cache_v8.c | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 2f3d07c..760023b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -227,6 +227,15 @@ config SYS_CONFIG_NAME The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h should be included from include/config.h. +config SYS_DISABLE_DCACHE_OPS + bool + help + This option disables dcache flush and dcache invalidation + operations. For example, on coherent systems where cache + operatios are not required, enable this option to avoid them. + Note that, its up to the individual architectures to implement + this functionality. + source "arch/arc/Kconfig" source "arch/arm/Kconfig" source "arch/m68k/Kconfig" diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index 0384051..9ca397e 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -443,6 +443,7 @@ inline void flush_dcache_all(void) debug("flushing dcache successfully.\n"); } +#ifndef CONFIG_SYS_DISABLE_DCACHE_OPS /* * Invalidates range in all levels of D-cache/unified cache */ @@ -458,6 +459,15 @@ void flush_dcache_range(unsigned long start, unsigned long stop) { __asm_flush_dcache_range(start, stop); } +#else +void invalidate_dcache_range(unsigned long start, unsigned long stop) +{ +} + +void flush_dcache_range(unsigned long start, unsigned long stop) +{ +} +#endif /* CONFIG_SYS_DISABLE_DCACHE_OPS */ void dcache_enable(void) { |