]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
MN10300: AM34: The current cacheflush routines operate by controlling tag regs
authorDavid Howells <dhowells@redhat.com>
Wed, 27 Oct 2010 16:28:43 +0000 (17:28 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 27 Oct 2010 16:28:43 +0000 (17:28 +0100)
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 <dhowells@redhat.com>
arch/mn10300/mm/Kconfig.cache
arch/mn10300/mm/Makefile
arch/mn10300/mm/cache-flush-by-tag.S [moved from arch/mn10300/mm/cache-flush-mn10300.S with 100% similarity]
arch/mn10300/mm/cache-inv-by-tag.S [moved from arch/mn10300/mm/cache-mn10300.S with 100% similarity]

index 56a88dd9c70ccbd4a3c843a3f81606b9589188b8..aa6ff0791138d9e941cbe698019b45396f137dd3 100644 (file)
@@ -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
index 1557277fbc5c03962c56f39b7d1a5687bdea80bd..dc4b9f0ea65c8b07a2c9e01e7b33473447f5e50e 100644 (file)
@@ -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