From 518d4bb7464dd3c04aeb23874dc360b54058c01e Mon Sep 17 00:00:00 2001 From: David Howells Date: Wed, 27 Oct 2010 17:28:43 +0100 Subject: [PATCH] MN10300: AM34: The current cacheflush routines operate by controlling tag regs The current cache flush and invalidate routines operate by controlling the cache tag registers. Rename the files and add config items to select them. This makes it easier to support the use of other cache flush methods instead, such as the use of AM34's area purge registers, if available. Signed-off-by: David Howells --- arch/mn10300/mm/Kconfig.cache | 20 +++++++++++++++++++ arch/mn10300/mm/Makefile | 5 +++-- ...e-flush-mn10300.S => cache-flush-by-tag.S} | 0 .../{cache-mn10300.S => cache-inv-by-tag.S} | 0 4 files changed, 23 insertions(+), 2 deletions(-) rename arch/mn10300/mm/{cache-flush-mn10300.S => cache-flush-by-tag.S} (100%) rename arch/mn10300/mm/{cache-mn10300.S => cache-inv-by-tag.S} (100%) diff --git a/arch/mn10300/mm/Kconfig.cache b/arch/mn10300/mm/Kconfig.cache index 56a88dd9c70c..aa6ff0791138 100644 --- a/arch/mn10300/mm/Kconfig.cache +++ b/arch/mn10300/mm/Kconfig.cache @@ -33,3 +33,23 @@ endchoice config MN10300_CACHE_ENABLED def_bool y if !MN10300_CACHE_DISABLED + + +choice + prompt "CPU cache flush/invalidate method" + default MN10300_CACHE_MANAGE_BY_TAG + depends on MN10300_CACHE_ENABLED + help + This determines the method by which CPU cache flushing and + invalidation is performed. + +config MN10300_CACHE_MANAGE_BY_TAG + bool "Use the cache tag registers directly" + +endchoice + +config MN10300_CACHE_INV_BY_TAG + def_bool y if MN10300_CACHE_MANAGE_BY_TAG && MN10300_CACHE_ENABLED + +config MN10300_CACHE_FLUSH_BY_TAG + def_bool y if MN10300_CACHE_MANAGE_BY_TAG && MN10300_CACHE_WBACK diff --git a/arch/mn10300/mm/Makefile b/arch/mn10300/mm/Makefile index 1557277fbc5c..dc4b9f0ea65c 100644 --- a/arch/mn10300/mm/Makefile +++ b/arch/mn10300/mm/Makefile @@ -2,8 +2,9 @@ # Makefile for the MN10300-specific memory management code # -cacheflush-y := cache.o cache-mn10300.o -cacheflush-$(CONFIG_MN10300_CACHE_WBACK) += cache-flush-mn10300.o +cacheflush-y := cache.o +cacheflush-$(CONFIG_MN10300_CACHE_INV_BY_TAG) += cache-inv-by-tag.o +cacheflush-$(CONFIG_MN10300_CACHE_FLUSH_BY_TAG) += cache-flush-by-tag.o cacheflush-$(CONFIG_MN10300_CACHE_DISABLED) := cache-disabled.o diff --git a/arch/mn10300/mm/cache-flush-mn10300.S b/arch/mn10300/mm/cache-flush-by-tag.S similarity index 100% rename from arch/mn10300/mm/cache-flush-mn10300.S rename to arch/mn10300/mm/cache-flush-by-tag.S diff --git a/arch/mn10300/mm/cache-mn10300.S b/arch/mn10300/mm/cache-inv-by-tag.S similarity index 100% rename from arch/mn10300/mm/cache-mn10300.S rename to arch/mn10300/mm/cache-inv-by-tag.S -- 2.34.1