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