aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/Kconfig
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2009-06-16 05:48:33 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-22 21:15:59 -0400
commit41ba653f24a39a0e6a4afe9b2763a95a57e042c2 (patch)
tree43eb086046d4eef764878e04512ddd215ca8845b /arch/blackfin/Kconfig
parent7c039a90f02c3fdcab8d3ca170c05ad37014189e (diff)
Blackfin: decouple unrelated cache settings to get exact behavior
The current cache options don't really represent the hardware features. They end up setting different aspects of the hardware so that the end result is to turn on/off the cache. Unfortunately, when we hit cache problems with the hardware, it's difficult to test different settings to root cause the problem. The current settings also don't cleanly allow for different caching behaviors with different regions of memory. So split the configure options such that they properly reflect the settings that are applied to the hardware. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/Kconfig')
-rw-r--r--arch/blackfin/Kconfig57
1 files changed, 39 insertions, 18 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 8140a2fc8bbd..220635a1ebdd 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -907,23 +907,41 @@ endchoice
907 907
908 908
909comment "Cache Support" 909comment "Cache Support"
910
910config BFIN_ICACHE 911config BFIN_ICACHE
911 bool "Enable ICACHE" 912 bool "Enable ICACHE"
913 default y
914config BFIN_ICACHE_LOCK
915 bool "Enable Instruction Cache Locking"
916 depends on BFIN_ICACHE
917 default n
918config BFIN_EXTMEM_ICACHEABLE
919 bool "Enable ICACHE for external memory"
920 depends on BFIN_ICACHE
921 default y
922config BFIN_L2_ICACHEABLE
923 bool "Enable ICACHE for L2 SRAM"
924 depends on BFIN_ICACHE
925 depends on BF54x || BF561
926 default n
927
912config BFIN_DCACHE 928config BFIN_DCACHE
913 bool "Enable DCACHE" 929 bool "Enable DCACHE"
930 default y
914config BFIN_DCACHE_BANKA 931config BFIN_DCACHE_BANKA
915 bool "Enable only 16k BankA DCACHE - BankB is SRAM" 932 bool "Enable only 16k BankA DCACHE - BankB is SRAM"
916 depends on BFIN_DCACHE && !BF531 933 depends on BFIN_DCACHE && !BF531
917 default n 934 default n
918config BFIN_ICACHE_LOCK 935config BFIN_EXTMEM_DCACHEABLE
919 bool "Enable Instruction Cache Locking" 936 bool "Enable DCACHE for external memory"
920
921choice
922 prompt "External memory cache policy"
923 depends on BFIN_DCACHE 937 depends on BFIN_DCACHE
924 default BFIN_WB if !SMP 938 default y
925 default BFIN_WT if SMP 939choice
926config BFIN_WB 940 prompt "External memory DCACHE policy"
941 depends on BFIN_EXTMEM_DCACHEABLE
942 default BFIN_EXTMEM_WRITEBACK if !SMP
943 default BFIN_EXTMEM_WRITETHROUGH if SMP
944config BFIN_EXTMEM_WRITEBACK
927 bool "Write back" 945 bool "Write back"
928 depends on !SMP 946 depends on !SMP
929 help 947 help
@@ -941,7 +959,7 @@ config BFIN_WB
941 If you are unsure of the options and you want to be safe, 959 If you are unsure of the options and you want to be safe,
942 then go with Write Through. 960 then go with Write Through.
943 961
944config BFIN_WT 962config BFIN_EXTMEM_WRITETHROUGH
945 bool "Write through" 963 bool "Write through"
946 help 964 help
947 Write Back Policy: 965 Write Back Policy:
@@ -960,23 +978,26 @@ config BFIN_WT
960 978
961endchoice 979endchoice
962 980
981config BFIN_L2_DCACHEABLE
982 bool "Enable DCACHE for L2 SRAM"
983 depends on BFIN_DCACHE
984 depends on BF54x || BF561
985 default n
963choice 986choice
964 prompt "L2 SRAM cache policy" 987 prompt "L2 SRAM DCACHE policy"
965 depends on (BF54x || BF561) 988 depends on BFIN_L2_DCACHEABLE
966 default BFIN_L2_WT 989 default BFIN_L2_WRITEBACK
967config BFIN_L2_WB 990config BFIN_L2_WRITEBACK
968 bool "Write back" 991 bool "Write back"
969 depends on !SMP 992 depends on !SMP
970 993
971config BFIN_L2_WT 994config BFIN_L2_WRITETHROUGH
972 bool "Write through" 995 bool "Write through"
973 depends on !SMP 996 depends on !SMP
974
975config BFIN_L2_NOT_CACHED
976 bool "Not cached"
977
978endchoice 997endchoice
979 998
999
1000comment "Memory Protection Unit"
980config MPU 1001config MPU
981 bool "Enable the memory protection unit (EXPERIMENTAL)" 1002 bool "Enable the memory protection unit (EXPERIMENTAL)"
982 default n 1003 default n