sh: Support explicit L1 cache disabling.
This reworks the cache mode configuration in Kconfig, and allows for explicit selection of write-back/write-through/off configurations. All of the cache flushing routines are optimized away for the off case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# Processor families
|
||||
#
|
||||
config CPU_SH2
|
||||
select SH_WRITETHROUGH if !CPU_SH2A
|
||||
bool
|
||||
|
||||
config CPU_SH2A
|
||||
@@ -414,8 +413,17 @@ config SH_DIRECT_MAPPED
|
||||
Turn this option off for platforms that do not have a direct-mapped
|
||||
cache, and you have no need to run the caches in such a configuration.
|
||||
|
||||
config SH_WRITETHROUGH
|
||||
bool "Use write-through caching"
|
||||
choice
|
||||
prompt "Cache mode"
|
||||
default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4
|
||||
default CACHE_WRITETHROUGH if (CPU_SH2 && !CPU_SH2A)
|
||||
|
||||
config CACHE_WRITEBACK
|
||||
bool "Write-back"
|
||||
depends on CPU_SH2A || CPU_SH3 || CPU_SH4
|
||||
|
||||
config CACHE_WRITETHROUGH
|
||||
bool "Write-through"
|
||||
help
|
||||
Selecting this option will configure the caches in write-through
|
||||
mode, as opposed to the default write-back configuration.
|
||||
@@ -426,4 +434,9 @@ config SH_WRITETHROUGH
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config CACHE_OFF
|
||||
bool "Off"
|
||||
|
||||
endchoice
|
||||
|
||||
endmenu
|
||||
|
Reference in New Issue
Block a user