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