Skip to content

Commit f64126f

Browse files
maass-hamburgcfriedt
authored andcommitted
arch: Kconfig: use if to siplify
use if to simplyfy dependencys. Signed-off-by: Fin Maaß <[email protected]>
1 parent 4cd8bcc commit f64126f

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

arch/Kconfig

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,12 @@ config CACHE_MANAGEMENT
11051105
This option enables the cache management functions backed by arch or
11061106
driver code.
11071107

1108+
if CACHE_MANAGEMENT
1109+
1110+
if DCACHE
1111+
11081112
config DCACHE_LINE_SIZE_DETECT
11091113
bool "Detect d-cache line size at runtime"
1110-
depends on CACHE_MANAGEMENT && DCACHE
11111114
help
11121115
This option enables querying some architecture-specific hardware for
11131116
finding the d-cache line size at the expense of taking more memory and
@@ -1119,7 +1122,7 @@ config DCACHE_LINE_SIZE_DETECT
11191122

11201123
config DCACHE_LINE_SIZE
11211124
int "d-cache line size"
1122-
depends on CACHE_MANAGEMENT && DCACHE && !DCACHE_LINE_SIZE_DETECT
1125+
depends on !DCACHE_LINE_SIZE_DETECT
11231126
default 0
11241127
help
11251128
Size in bytes of a CPU d-cache line. If this is set to 0 the value is
@@ -1128,9 +1131,12 @@ config DCACHE_LINE_SIZE
11281131

11291132
Detect automatically at runtime by selecting DCACHE_LINE_SIZE_DETECT.
11301133

1134+
endif # DCACHE
1135+
1136+
if ICACHE
1137+
11311138
config ICACHE_LINE_SIZE_DETECT
11321139
bool "Detect i-cache line size at runtime"
1133-
depends on CACHE_MANAGEMENT && ICACHE
11341140
help
11351141
This option enables querying some architecture-specific hardware for
11361142
finding the i-cache line size at the expense of taking more memory and
@@ -1142,17 +1148,18 @@ config ICACHE_LINE_SIZE_DETECT
11421148

11431149
config ICACHE_LINE_SIZE
11441150
int "i-cache line size"
1145-
depends on CACHE_MANAGEMENT && ICACHE && !ICACHE_LINE_SIZE_DETECT
1151+
depends on !ICACHE_LINE_SIZE_DETECT
11461152
default 0
11471153
help
11481154
Size in bytes of a CPU i-cache line. If this is set to 0 the value is
11491155
obtained from the 'i-cache-line-size' DT property instead if present.
11501156

11511157
Detect automatically at runtime by selecting ICACHE_LINE_SIZE_DETECT.
11521158

1159+
endif # ICACHE
1160+
11531161
choice CACHE_TYPE
11541162
prompt "Cache type"
1155-
depends on CACHE_MANAGEMENT
11561163
default ARCH_CACHE
11571164

11581165
config ARCH_CACHE
@@ -1167,6 +1174,8 @@ config EXTERNAL_CACHE
11671174

11681175
endchoice
11691176

1177+
endif # CACHE_MANAGEMENT
1178+
11701179
endmenu
11711180

11721181
config ARCH

0 commit comments

Comments
 (0)