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
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 GENERIC_TIME_VSYSCALL
39 select GENERIC_VDSO_32
40 select GENERIC_GETTIMEOFDAY
41 select GX6605S_TIMER if CPU_CK610
42 select HAVE_ARCH_TRACEHOOK
43 select HAVE_ARCH_AUDITSYSCALL
44 select HAVE_ARCH_MMAP_RND_BITS
45 select HAVE_ARCH_SECCOMP_FILTER
46 select HAVE_CONTEXT_TRACKING
47 select HAVE_VIRT_CPU_ACCOUNTING_GEN
48 select HAVE_DEBUG_BUGVERBOSE
49 select HAVE_DEBUG_KMEMLEAK
50 select HAVE_DYNAMIC_FTRACE
51 select HAVE_DYNAMIC_FTRACE_WITH_REGS
52 select HAVE_GENERIC_VDSO
53 select HAVE_FUNCTION_TRACER
54 select HAVE_FUNCTION_GRAPH_TRACER
55 select HAVE_FUNCTION_ERROR_INJECTION
56 select HAVE_FUTEX_CMPXCHG if FUTEX && SMP
57 select HAVE_FTRACE_MCOUNT_RECORD
58 select HAVE_KERNEL_GZIP
59 select HAVE_KERNEL_LZO
60 select HAVE_KERNEL_LZMA
61 select HAVE_KPROBES if !CPU_CK610
62 select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
63 select HAVE_KRETPROBES if !CPU_CK610
64 select HAVE_PERF_EVENTS
66 select HAVE_PERF_USER_STACK_DUMP
67 select HAVE_DMA_CONTIGUOUS
68 select HAVE_REGS_AND_STACK_ACCESS_API
70 select HAVE_STACKPROTECTOR
71 select HAVE_SYSCALL_TRACEPOINTS
72 select MAY_HAVE_SPARSE_IRQ
73 select MODULES_USE_ELF_RELA if MODULES
75 select OF_EARLY_FLATTREE
76 select PERF_USE_VMALLOC if CPU_CK610
79 select GENERIC_PCI_IOMAP
81 select PCI_DOMAINS_GENERIC if PCI
82 select PCI_SYSCALL if PCI
85 select TRACE_IRQFLAGS_SUPPORT
87 config LOCKDEP_SUPPORT
90 config ARCH_SUPPORTS_UPROBES
91 def_bool y if !CPU_CK610
93 config CPU_HAS_CACHEV2
105 config CPU_HAS_LDSTEX
108 For SMP, CPU needs "ldex&stex" instructions for atomic operations.
110 config CPU_NEED_TLBSYNC
113 config CPU_NEED_SOFTALIGN
116 config CPU_NO_USER_BKPT
119 For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
120 abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
121 So we need a 16bit instruction as user space bkpt, and it will cause an illegal
122 instruction exception.
123 In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
125 config GENERIC_CALIBRATE_DELAY
131 config GENERIC_HWEIGHT
137 config STACKTRACE_SUPPORT
145 default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
146 default "1024" if (CPU_CK860)
150 default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
151 default "12" if (CPU_CK860)
153 config L1_CACHE_SHIFT
155 default "4" if (CPU_CK610)
156 default "5" if (CPU_CK807 || CPU_CK810)
157 default "6" if (CPU_CK860)
159 config ARCH_MMAP_RND_BITS_MIN
162 # max bits determined by the following formula:
163 # VA_BITS - PAGE_SHIFT - 3
164 config ARCH_MMAP_RND_BITS_MAX
167 menu "Processor type and features"
174 bool "CSKY CPU ck610"
175 select CPU_NEED_TLBSYNC
176 select CPU_NEED_SOFTALIGN
177 select CPU_NO_USER_BKPT
180 bool "CSKY CPU ck810"
182 select CPU_NEED_TLBSYNC
185 bool "CSKY CPU ck807"
189 bool "CSKY CPU ck860"
191 select CPU_HAS_CACHEV2
192 select CPU_HAS_LDSTEX
198 default PAGE_OFFSET_80000000
200 config PAGE_OFFSET_80000000
201 bool "PAGE OFFSET 2G (user:kernel = 2:2)"
203 config PAGE_OFFSET_A0000000
204 bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)"
209 default 0x80000000 if PAGE_OFFSET_80000000
210 default 0xa0000000 if PAGE_OFFSET_A0000000
213 prompt "C-SKY PMU type"
214 depends on PERF_EVENTS
215 depends on CPU_CK807 || CPU_CK810 || CPU_CK860
221 bool "Performance Monitoring Unit Ver.1"
226 prompt "Power Manager Instruction (wait/doze/stop)"
243 bool "Tightly-Coupled/Sram Memory"
245 The implementation are not only used by TCM (Tightly-Coupled Meory)
246 but also used by sram on SOC bus. It follow existed linux tcm
247 software interface, so that old tcm application codes could be
256 int "Page count of ITCM size: NR*4KB"
269 int "Page count of DTCM size: NR*4KB"
276 bool "CPU has VDSP coprocessor"
277 depends on CPU_HAS_FPU && CPU_HAS_FPUV2
280 bool "CPU has FPU coprocessor"
281 depends on CPU_CK807 || CPU_CK810 || CPU_CK860
283 config CPU_HAS_ICACHE_INS
284 bool "CPU has Icache invalidate instructions"
285 depends on CPU_HAS_CACHEV2
288 bool "CPU has Trusted Execution Environment"
292 bool "Symmetric Multi-Processing (SMP) support for C-SKY"
297 int "Maximum number of CPUs (2-32)"
303 bool "High Memory Support"
304 depends on !CPU_CK610
308 config FORCE_MAX_ZONEORDER
309 int "Maximum zone order"
313 hex "DRAM start addr (the same with memory-section in dts)"
317 bool "Support for hot-pluggable CPUs"
318 select GENERIC_IRQ_MIGRATION
321 Say Y here to allow turning CPUs off and on. CPUs can be
322 controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
324 Say N if you want to disable CPU hotplug.
327 source "arch/csky/Kconfig.platforms"
329 source "kernel/Kconfig.hz"