Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 2 | config CSKY |
| 3 | def_bool y |
Yury Norov | 942fa98 | 2018-05-16 11:18:49 +0300 | [diff] [blame] | 4 | select ARCH_32BIT_OFF_T |
Christoph Hellwig | 13bf5ce | 2019-03-25 15:44:06 +0100 | [diff] [blame] | 5 | select ARCH_HAS_DMA_PREP_COHERENT |
Ma Jun | de86367 | 2020-03-10 23:32:56 +0800 | [diff] [blame] | 6 | select ARCH_HAS_GCOV_PROFILE_ALL |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 7 | select ARCH_HAS_SYNC_DMA_FOR_CPU |
| 8 | select ARCH_HAS_SYNC_DMA_FOR_DEVICE |
| 9 | select ARCH_USE_BUILTIN_BSWAP |
Guo Ren | 8e35ac7 | 2020-12-20 08:12:45 +0000 | [diff] [blame] | 10 | select ARCH_USE_QUEUED_RWLOCKS |
Guenter Roeck | aeba0b8 | 2021-09-16 21:38:36 -0700 | [diff] [blame] | 11 | select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace) |
Guo Ren | 953131e | 2020-07-30 12:44:12 +0000 | [diff] [blame] | 12 | select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 13 | select COMMON_CLK |
| 14 | select CLKSRC_MMIO |
Guo Ren | 1994cc4 | 2019-05-10 12:57:27 +0800 | [diff] [blame] | 15 | select CSKY_MPINTC if CPU_CK860 |
| 16 | select CSKY_MP_TIMER if CPU_CK860 |
| 17 | select CSKY_APB_INTC |
Christoph Hellwig | f04b951 | 2018-11-04 17:47:44 +0100 | [diff] [blame] | 18 | select DMA_DIRECT_REMAP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 19 | select IRQ_DOMAIN |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 20 | select DW_APB_TIMER_OF |
Christoph Hellwig | 0055f67 | 2019-08-13 11:41:57 +0200 | [diff] [blame] | 21 | select GENERIC_IOREMAP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 22 | select GENERIC_LIB_ASHLDI3 |
| 23 | select GENERIC_LIB_ASHRDI3 |
| 24 | select GENERIC_LIB_LSHRDI3 |
| 25 | select GENERIC_LIB_MULDI3 |
| 26 | select GENERIC_LIB_CMPDI2 |
| 27 | select GENERIC_LIB_UCMPDI2 |
| 28 | select GENERIC_ALLOCATOR |
| 29 | select GENERIC_ATOMIC64 |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 30 | select GENERIC_CPU_DEVICES |
| 31 | select GENERIC_IRQ_CHIP |
| 32 | select GENERIC_IRQ_PROBE |
| 33 | select GENERIC_IRQ_SHOW |
| 34 | select GENERIC_IRQ_MULTI_HANDLER |
| 35 | select GENERIC_SCHED_CLOCK |
| 36 | select GENERIC_SMP_IDLE_THREAD |
Guo Ren | 0d3b051 | 2021-01-17 23:38:18 +0800 | [diff] [blame] | 37 | select GENERIC_TIME_VSYSCALL |
| 38 | select GENERIC_VDSO_32 |
| 39 | select GENERIC_GETTIMEOFDAY |
Guo Ren | 1994cc4 | 2019-05-10 12:57:27 +0800 | [diff] [blame] | 40 | select GX6605S_TIMER if CPU_CK610 |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 41 | select HAVE_ARCH_TRACEHOOK |
Guo Ren | 2f7932b | 2019-03-20 18:27:27 +0800 | [diff] [blame] | 42 | select HAVE_ARCH_AUDITSYSCALL |
Guo Ren | 953131e | 2020-07-30 12:44:12 +0000 | [diff] [blame] | 43 | select HAVE_ARCH_MMAP_RND_BITS |
Guo Ren | e95a4f8 | 2020-05-26 08:11:52 +0000 | [diff] [blame] | 44 | select HAVE_ARCH_SECCOMP_FILTER |
Guo Ren | bdcd93e | 2020-07-31 09:13:51 +0000 | [diff] [blame] | 45 | select HAVE_CONTEXT_TRACKING |
| 46 | select HAVE_VIRT_CPU_ACCOUNTING_GEN |
Guo Ren | 18c07d2 | 2020-05-13 15:15:25 +0800 | [diff] [blame] | 47 | select HAVE_DEBUG_BUGVERBOSE |
Guo Ren | c109f42 | 2020-12-24 03:34:43 +0000 | [diff] [blame] | 48 | select HAVE_DEBUG_KMEMLEAK |
Guo Ren | 28bb030 | 2019-03-01 08:50:36 +0800 | [diff] [blame] | 49 | select HAVE_DYNAMIC_FTRACE |
Guo Ren | 89a3927 | 2020-02-18 20:27:39 +0800 | [diff] [blame] | 50 | select HAVE_DYNAMIC_FTRACE_WITH_REGS |
Guo Ren | 0d3b051 | 2021-01-17 23:38:18 +0800 | [diff] [blame] | 51 | select HAVE_GENERIC_VDSO |
Guo Ren | 230c77a | 2018-12-09 14:29:59 +0800 | [diff] [blame] | 52 | select HAVE_FUNCTION_TRACER |
Guo Ren | d7950be | 2018-12-15 21:04:27 +0800 | [diff] [blame] | 53 | select HAVE_FUNCTION_GRAPH_TRACER |
Guo Ren | 71e193d | 2020-07-28 16:30:46 +0000 | [diff] [blame] | 54 | select HAVE_FUNCTION_ERROR_INJECTION |
Guo Ren | 28bb030 | 2019-03-01 08:50:36 +0800 | [diff] [blame] | 55 | select HAVE_FTRACE_MCOUNT_RECORD |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 56 | select HAVE_KERNEL_GZIP |
| 57 | select HAVE_KERNEL_LZO |
| 58 | select HAVE_KERNEL_LZMA |
Guo Ren | 33e53ae | 2020-04-01 09:17:02 +0800 | [diff] [blame] | 59 | select HAVE_KPROBES if !CPU_CK610 |
| 60 | select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 |
| 61 | select HAVE_KRETPROBES if !CPU_CK610 |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 62 | select HAVE_PERF_EVENTS |
Mao Han | daac95e | 2019-04-15 17:17:29 +0800 | [diff] [blame] | 63 | select HAVE_PERF_REGS |
| 64 | select HAVE_PERF_USER_STACK_DUMP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 65 | select HAVE_DMA_CONTIGUOUS |
Guo Ren | bfe47f3 | 2019-12-17 14:57:22 +0800 | [diff] [blame] | 66 | select HAVE_REGS_AND_STACK_ACCESS_API |
Guo Ren | 9866d14 | 2019-11-05 09:58:33 +0800 | [diff] [blame] | 67 | select HAVE_RSEQ |
Mao Han | 2f78c73 | 2019-10-11 10:56:55 +0800 | [diff] [blame] | 68 | select HAVE_STACKPROTECTOR |
Guo Ren | 2f7932b | 2019-03-20 18:27:27 +0800 | [diff] [blame] | 69 | select HAVE_SYSCALL_TRACEPOINTS |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 70 | select MAY_HAVE_SPARSE_IRQ |
| 71 | select MODULES_USE_ELF_RELA if MODULES |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 72 | select OF |
| 73 | select OF_EARLY_FLATTREE |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 74 | select PERF_USE_VMALLOC if CPU_CK610 |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 75 | select RTC_LIB |
| 76 | select TIMER_OF |
MaJun | 5b49c82 | 2020-01-27 10:56:21 +0800 | [diff] [blame] | 77 | select GENERIC_PCI_IOMAP |
| 78 | select HAVE_PCI |
| 79 | select PCI_DOMAINS_GENERIC if PCI |
| 80 | select PCI_SYSCALL if PCI |
| 81 | select PCI_MSI if PCI |
Christoph Hellwig | 5e6e985 | 2020-09-03 16:22:35 +0200 | [diff] [blame] | 82 | select SET_FS |
Masahiro Yamada | 4aae683 | 2021-07-31 14:22:32 +0900 | [diff] [blame] | 83 | select TRACE_IRQFLAGS_SUPPORT |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 84 | |
Guo Ren | 000591f | 2020-04-02 19:39:42 +0800 | [diff] [blame] | 85 | config LOCKDEP_SUPPORT |
| 86 | def_bool y |
| 87 | |
Guo Ren | 8f6bb79 | 2020-04-02 19:52:27 +0800 | [diff] [blame] | 88 | config ARCH_SUPPORTS_UPROBES |
| 89 | def_bool y if !CPU_CK610 |
| 90 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 91 | config CPU_HAS_CACHEV2 |
| 92 | bool |
| 93 | |
| 94 | config CPU_HAS_FPUV2 |
| 95 | bool |
| 96 | |
| 97 | config CPU_HAS_HILO |
| 98 | bool |
| 99 | |
| 100 | config CPU_HAS_TLBI |
| 101 | bool |
| 102 | |
| 103 | config CPU_HAS_LDSTEX |
| 104 | bool |
| 105 | help |
Randy Dunlap | bebd26a | 2020-01-31 17:52:30 -0800 | [diff] [blame] | 106 | For SMP, CPU needs "ldex&stex" instructions for atomic operations. |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 107 | |
| 108 | config CPU_NEED_TLBSYNC |
| 109 | bool |
| 110 | |
| 111 | config CPU_NEED_SOFTALIGN |
| 112 | bool |
| 113 | |
| 114 | config CPU_NO_USER_BKPT |
| 115 | bool |
| 116 | help |
| 117 | For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because |
| 118 | abiv2 is 16/32bit instruction set and "trap 1" is 32bit. |
| 119 | So we need a 16bit instruction as user space bkpt, and it will cause an illegal |
| 120 | instruction exception. |
| 121 | In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. |
| 122 | |
| 123 | config GENERIC_CALIBRATE_DELAY |
| 124 | def_bool y |
| 125 | |
| 126 | config GENERIC_CSUM |
| 127 | def_bool y |
| 128 | |
| 129 | config GENERIC_HWEIGHT |
| 130 | def_bool y |
| 131 | |
| 132 | config MMU |
| 133 | def_bool y |
| 134 | |
Guo Ren | 0ea2dc7 | 2018-12-09 14:18:05 +0800 | [diff] [blame] | 135 | config STACKTRACE_SUPPORT |
| 136 | def_bool y |
| 137 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 138 | config TIME_LOW_RES |
| 139 | def_bool y |
| 140 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 141 | config CPU_TLB_SIZE |
| 142 | int |
| 143 | default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810) |
| 144 | default "1024" if (CPU_CK860) |
| 145 | |
| 146 | config CPU_ASID_BITS |
| 147 | int |
| 148 | default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) |
| 149 | default "12" if (CPU_CK860) |
| 150 | |
| 151 | config L1_CACHE_SHIFT |
| 152 | int |
| 153 | default "4" if (CPU_CK610) |
| 154 | default "5" if (CPU_CK807 || CPU_CK810) |
| 155 | default "6" if (CPU_CK860) |
| 156 | |
Guo Ren | 953131e | 2020-07-30 12:44:12 +0000 | [diff] [blame] | 157 | config ARCH_MMAP_RND_BITS_MIN |
| 158 | default 8 |
| 159 | |
| 160 | # max bits determined by the following formula: |
| 161 | # VA_BITS - PAGE_SHIFT - 3 |
| 162 | config ARCH_MMAP_RND_BITS_MAX |
| 163 | default 17 |
| 164 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 165 | menu "Processor type and features" |
| 166 | |
| 167 | choice |
| 168 | prompt "CPU MODEL" |
| 169 | default CPU_CK807 |
| 170 | |
| 171 | config CPU_CK610 |
| 172 | bool "CSKY CPU ck610" |
| 173 | select CPU_NEED_TLBSYNC |
| 174 | select CPU_NEED_SOFTALIGN |
| 175 | select CPU_NO_USER_BKPT |
| 176 | |
| 177 | config CPU_CK810 |
| 178 | bool "CSKY CPU ck810" |
| 179 | select CPU_HAS_HILO |
| 180 | select CPU_NEED_TLBSYNC |
| 181 | |
| 182 | config CPU_CK807 |
| 183 | bool "CSKY CPU ck807" |
| 184 | select CPU_HAS_HILO |
| 185 | |
| 186 | config CPU_CK860 |
| 187 | bool "CSKY CPU ck860" |
| 188 | select CPU_HAS_TLBI |
| 189 | select CPU_HAS_CACHEV2 |
| 190 | select CPU_HAS_LDSTEX |
| 191 | select CPU_HAS_FPUV2 |
| 192 | endchoice |
| 193 | |
| 194 | choice |
Guo Ren | 0c8a32e | 2020-09-07 06:20:18 +0000 | [diff] [blame] | 195 | prompt "PAGE OFFSET" |
| 196 | default PAGE_OFFSET_80000000 |
| 197 | |
| 198 | config PAGE_OFFSET_80000000 |
| 199 | bool "PAGE OFFSET 2G (user:kernel = 2:2)" |
| 200 | |
| 201 | config PAGE_OFFSET_A0000000 |
| 202 | bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)" |
| 203 | endchoice |
| 204 | |
| 205 | config PAGE_OFFSET |
| 206 | hex |
| 207 | default 0x80000000 if PAGE_OFFSET_80000000 |
| 208 | default 0xa0000000 if PAGE_OFFSET_A0000000 |
| 209 | choice |
| 210 | |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 211 | prompt "C-SKY PMU type" |
| 212 | depends on PERF_EVENTS |
| 213 | depends on CPU_CK807 || CPU_CK810 || CPU_CK860 |
| 214 | |
| 215 | config CPU_PMU_NONE |
| 216 | bool "None" |
| 217 | |
| 218 | config CSKY_PMU_V1 |
| 219 | bool "Performance Monitoring Unit Ver.1" |
| 220 | |
| 221 | endchoice |
| 222 | |
| 223 | choice |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 224 | prompt "Power Manager Instruction (wait/doze/stop)" |
| 225 | default CPU_PM_NONE |
| 226 | |
| 227 | config CPU_PM_NONE |
| 228 | bool "None" |
| 229 | |
| 230 | config CPU_PM_WAIT |
| 231 | bool "wait" |
| 232 | |
| 233 | config CPU_PM_DOZE |
| 234 | bool "doze" |
| 235 | |
| 236 | config CPU_PM_STOP |
| 237 | bool "stop" |
| 238 | endchoice |
| 239 | |
Guo Ren | f525bb2 | 2019-11-27 08:44:33 +0800 | [diff] [blame] | 240 | menuconfig HAVE_TCM |
| 241 | bool "Tightly-Coupled/Sram Memory" |
Guenter Roeck | e21e52a | 2021-09-16 21:38:38 -0700 | [diff] [blame] | 242 | depends on !COMPILE_TEST |
Guo Ren | f525bb2 | 2019-11-27 08:44:33 +0800 | [diff] [blame] | 243 | help |
| 244 | The implementation are not only used by TCM (Tightly-Coupled Meory) |
| 245 | but also used by sram on SOC bus. It follow existed linux tcm |
| 246 | software interface, so that old tcm application codes could be |
| 247 | re-used directly. |
| 248 | |
| 249 | if HAVE_TCM |
| 250 | config ITCM_RAM_BASE |
| 251 | hex "ITCM ram base" |
| 252 | default 0xffffffff |
| 253 | |
| 254 | config ITCM_NR_PAGES |
| 255 | int "Page count of ITCM size: NR*4KB" |
| 256 | range 1 256 |
| 257 | default 32 |
| 258 | |
| 259 | config HAVE_DTCM |
| 260 | bool "DTCM Support" |
| 261 | |
| 262 | config DTCM_RAM_BASE |
| 263 | hex "DTCM ram base" |
| 264 | depends on HAVE_DTCM |
| 265 | default 0xffffffff |
| 266 | |
| 267 | config DTCM_NR_PAGES |
| 268 | int "Page count of DTCM size: NR*4KB" |
| 269 | depends on HAVE_DTCM |
| 270 | range 1 256 |
| 271 | default 32 |
| 272 | endif |
| 273 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 274 | config CPU_HAS_VDSP |
| 275 | bool "CPU has VDSP coprocessor" |
| 276 | depends on CPU_HAS_FPU && CPU_HAS_FPUV2 |
| 277 | |
| 278 | config CPU_HAS_FPU |
| 279 | bool "CPU has FPU coprocessor" |
| 280 | depends on CPU_CK807 || CPU_CK810 || CPU_CK860 |
| 281 | |
Guo Ren | 761b4f6 | 2020-01-22 11:15:14 +0800 | [diff] [blame] | 282 | config CPU_HAS_ICACHE_INS |
| 283 | bool "CPU has Icache invalidate instructions" |
| 284 | depends on CPU_HAS_CACHEV2 |
| 285 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 286 | config CPU_HAS_TEE |
| 287 | bool "CPU has Trusted Execution Environment" |
| 288 | depends on CPU_CK810 |
| 289 | |
| 290 | config SMP |
| 291 | bool "Symmetric Multi-Processing (SMP) support for C-SKY" |
| 292 | depends on CPU_CK860 |
| 293 | default n |
| 294 | |
| 295 | config NR_CPUS |
| 296 | int "Maximum number of CPUs (2-32)" |
| 297 | range 2 32 |
| 298 | depends on SMP |
Guo Ren | 50d23a1 | 2020-07-30 13:12:00 +0000 | [diff] [blame] | 299 | default "4" |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 300 | |
| 301 | config HIGHMEM |
| 302 | bool "High Memory Support" |
| 303 | depends on !CPU_CK610 |
Thomas Gleixner | 5af627a | 2020-11-03 10:27:23 +0100 | [diff] [blame] | 304 | select KMAP_LOCAL |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 305 | default y |
| 306 | |
| 307 | config FORCE_MAX_ZONEORDER |
| 308 | int "Maximum zone order" |
| 309 | default "11" |
| 310 | |
Randy Dunlap | d199161 | 2021-04-16 15:46:03 -0700 | [diff] [blame] | 311 | config DRAM_BASE |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 312 | hex "DRAM start addr (the same with memory-section in dts)" |
| 313 | default 0x0 |
| 314 | |
Guo Ren | 859e5f4 | 2018-12-19 19:56:14 +0800 | [diff] [blame] | 315 | config HOTPLUG_CPU |
| 316 | bool "Support for hot-pluggable CPUs" |
| 317 | select GENERIC_IRQ_MIGRATION |
| 318 | depends on SMP |
| 319 | help |
| 320 | Say Y here to allow turning CPUs off and on. CPUs can be |
| 321 | controlled through /sys/devices/system/cpu/cpu1/hotplug/target. |
| 322 | |
| 323 | Say N if you want to disable CPU hotplug. |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 324 | endmenu |
| 325 | |
Guo Ren | a736fa1 | 2020-01-11 13:44:32 +0800 | [diff] [blame] | 326 | source "arch/csky/Kconfig.platforms" |
| 327 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 328 | source "kernel/Kconfig.hz" |