1 # SPDX-License-Identifier: GPL-2.0-only
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 ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
15 select CSKY_MPINTC if CPU_CK860
16 select CSKY_MP_TIMER if CPU_CK860
18 select DMA_DIRECT_REMAP
20 select HANDLE_DOMAIN_IRQ
21 select DW_APB_TIMER_OF
22 select GENERIC_IOREMAP
23 select GENERIC_LIB_ASHLDI3
24 select GENERIC_LIB_ASHRDI3
25 select GENERIC_LIB_LSHRDI3
26 select GENERIC_LIB_MULDI3
27 select GENERIC_LIB_CMPDI2
28 select GENERIC_LIB_UCMPDI2
29 select GENERIC_ALLOCATOR
30 select GENERIC_ATOMIC64
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_ARCH_MMAP_RND_BITS
42 select HAVE_ARCH_SECCOMP_FILTER
43 select HAVE_CONTEXT_TRACKING
44 select HAVE_VIRT_CPU_ACCOUNTING_GEN
45 select HAVE_DEBUG_BUGVERBOSE
46 select HAVE_DYNAMIC_FTRACE
47 select HAVE_DYNAMIC_FTRACE_WITH_REGS
48 select HAVE_FUNCTION_TRACER
49 select HAVE_FUNCTION_GRAPH_TRACER
50 select HAVE_FUNCTION_ERROR_INJECTION
51 select HAVE_FTRACE_MCOUNT_RECORD
52 select HAVE_KERNEL_GZIP
53 select HAVE_KERNEL_LZO
54 select HAVE_KERNEL_LZMA
55 select HAVE_KPROBES if !CPU_CK610
56 select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
57 select HAVE_KRETPROBES if !CPU_CK610
58 select HAVE_PERF_EVENTS
60 select HAVE_PERF_USER_STACK_DUMP
61 select HAVE_DMA_CONTIGUOUS
62 select HAVE_REGS_AND_STACK_ACCESS_API
64 select HAVE_STACKPROTECTOR
65 select HAVE_SYSCALL_TRACEPOINTS
66 select MAY_HAVE_SPARSE_IRQ
67 select MODULES_USE_ELF_RELA if MODULES
69 select OF_EARLY_FLATTREE
70 select PERF_USE_VMALLOC if CPU_CK610
73 select USB_ARCH_HAS_EHCI
74 select USB_ARCH_HAS_OHCI
75 select GENERIC_PCI_IOMAP
77 select PCI_DOMAINS_GENERIC if PCI
78 select PCI_SYSCALL if PCI
82 config LOCKDEP_SUPPORT
85 config ARCH_SUPPORTS_UPROBES
86 def_bool y if !CPU_CK610
88 config CPU_HAS_CACHEV2
100 config CPU_HAS_LDSTEX
103 For SMP, CPU needs "ldex&stex" instructions for atomic operations.
105 config CPU_NEED_TLBSYNC
108 config CPU_NEED_SOFTALIGN
111 config CPU_NO_USER_BKPT
114 For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
115 abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
116 So we need a 16bit instruction as user space bkpt, and it will cause an illegal
117 instruction exception.
118 In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
120 config GENERIC_CALIBRATE_DELAY
126 config GENERIC_HWEIGHT
132 config STACKTRACE_SUPPORT
138 config TRACE_IRQFLAGS_SUPPORT
143 default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
144 default "1024" if (CPU_CK860)
148 default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
149 default "12" if (CPU_CK860)
151 config L1_CACHE_SHIFT
153 default "4" if (CPU_CK610)
154 default "5" if (CPU_CK807 || CPU_CK810)
155 default "6" if (CPU_CK860)
157 config ARCH_MMAP_RND_BITS_MIN
160 # max bits determined by the following formula:
161 # VA_BITS - PAGE_SHIFT - 3
162 config ARCH_MMAP_RND_BITS_MAX
165 menu "Processor type and features"
172 bool "CSKY CPU ck610"
173 select CPU_NEED_TLBSYNC
174 select CPU_NEED_SOFTALIGN
175 select CPU_NO_USER_BKPT
178 bool "CSKY CPU ck810"
180 select CPU_NEED_TLBSYNC
183 bool "CSKY CPU ck807"
187 bool "CSKY CPU ck860"
189 select CPU_HAS_CACHEV2
190 select CPU_HAS_LDSTEX
195 prompt "C-SKY PMU type"
196 depends on PERF_EVENTS
197 depends on CPU_CK807 || CPU_CK810 || CPU_CK860
203 bool "Performance Monitoring Unit Ver.1"
208 prompt "Power Manager Instruction (wait/doze/stop)"
225 bool "Tightly-Coupled/Sram Memory"
226 select GENERIC_ALLOCATOR
228 The implementation are not only used by TCM (Tightly-Coupled Meory)
229 but also used by sram on SOC bus. It follow existed linux tcm
230 software interface, so that old tcm application codes could be
239 int "Page count of ITCM size: NR*4KB"
252 int "Page count of DTCM size: NR*4KB"
259 bool "CPU has VDSP coprocessor"
260 depends on CPU_HAS_FPU && CPU_HAS_FPUV2
263 bool "CPU has FPU coprocessor"
264 depends on CPU_CK807 || CPU_CK810 || CPU_CK860
266 config CPU_HAS_ICACHE_INS
267 bool "CPU has Icache invalidate instructions"
268 depends on CPU_HAS_CACHEV2
271 bool "CPU has Trusted Execution Environment"
275 bool "Symmetric Multi-Processing (SMP) support for C-SKY"
280 int "Maximum number of CPUs (2-32)"
286 bool "High Memory Support"
287 depends on !CPU_CK610
291 config FORCE_MAX_ZONEORDER
292 int "Maximum zone order"
296 hex "DRAM start addr (the same with memory-section in dts)"
300 bool "Support for hot-pluggable CPUs"
301 select GENERIC_IRQ_MIGRATION
304 Say Y here to allow turning CPUs off and on. CPUs can be
305 controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
307 Say N if you want to disable CPU hotplug.
310 source "arch/csky/Kconfig.platforms"
312 source "kernel/Kconfig.hz"