irq: remove handle_domain_{irq,nmi}()
[linux-block.git] / arch / csky / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 config 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 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_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
37         select GENERIC_TIME_VSYSCALL
38         select GENERIC_VDSO_32
39         select GENERIC_GETTIMEOFDAY
40         select GX6605S_TIMER if CPU_CK610
41         select HAVE_ARCH_TRACEHOOK
42         select HAVE_ARCH_AUDITSYSCALL
43         select HAVE_ARCH_MMAP_RND_BITS
44         select HAVE_ARCH_SECCOMP_FILTER
45         select HAVE_CONTEXT_TRACKING
46         select HAVE_VIRT_CPU_ACCOUNTING_GEN
47         select HAVE_DEBUG_BUGVERBOSE
48         select HAVE_DEBUG_KMEMLEAK
49         select HAVE_DYNAMIC_FTRACE
50         select HAVE_DYNAMIC_FTRACE_WITH_REGS
51         select HAVE_GENERIC_VDSO
52         select HAVE_FUNCTION_TRACER
53         select HAVE_FUNCTION_GRAPH_TRACER
54         select HAVE_FUNCTION_ERROR_INJECTION
55         select HAVE_FUTEX_CMPXCHG if FUTEX && SMP
56         select HAVE_FTRACE_MCOUNT_RECORD
57         select HAVE_KERNEL_GZIP
58         select HAVE_KERNEL_LZO
59         select HAVE_KERNEL_LZMA
60         select HAVE_KPROBES if !CPU_CK610
61         select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
62         select HAVE_KRETPROBES if !CPU_CK610
63         select HAVE_PERF_EVENTS
64         select HAVE_PERF_REGS
65         select HAVE_PERF_USER_STACK_DUMP
66         select HAVE_DMA_CONTIGUOUS
67         select HAVE_REGS_AND_STACK_ACCESS_API
68         select HAVE_RSEQ
69         select HAVE_STACKPROTECTOR
70         select HAVE_SYSCALL_TRACEPOINTS
71         select MAY_HAVE_SPARSE_IRQ
72         select MODULES_USE_ELF_RELA if MODULES
73         select OF
74         select OF_EARLY_FLATTREE
75         select PERF_USE_VMALLOC if CPU_CK610
76         select RTC_LIB
77         select TIMER_OF
78         select GENERIC_PCI_IOMAP
79         select HAVE_PCI
80         select PCI_DOMAINS_GENERIC if PCI
81         select PCI_SYSCALL if PCI
82         select PCI_MSI if PCI
83         select SET_FS
84         select TRACE_IRQFLAGS_SUPPORT
85
86 config LOCKDEP_SUPPORT
87         def_bool y
88
89 config ARCH_SUPPORTS_UPROBES
90         def_bool y if !CPU_CK610
91
92 config CPU_HAS_CACHEV2
93         bool
94
95 config CPU_HAS_FPUV2
96         bool
97
98 config CPU_HAS_HILO
99         bool
100
101 config CPU_HAS_TLBI
102         bool
103
104 config CPU_HAS_LDSTEX
105         bool
106         help
107           For SMP, CPU needs "ldex&stex" instructions for atomic operations.
108
109 config CPU_NEED_TLBSYNC
110         bool
111
112 config CPU_NEED_SOFTALIGN
113         bool
114
115 config CPU_NO_USER_BKPT
116         bool
117         help
118           For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
119           abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
120           So we need a 16bit instruction as user space bkpt, and it will cause an illegal
121           instruction exception.
122           In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
123
124 config GENERIC_CALIBRATE_DELAY
125         def_bool y
126
127 config GENERIC_CSUM
128         def_bool y
129
130 config GENERIC_HWEIGHT
131         def_bool y
132
133 config MMU
134         def_bool y
135
136 config STACKTRACE_SUPPORT
137         def_bool y
138
139 config TIME_LOW_RES
140         def_bool y
141
142 config CPU_TLB_SIZE
143         int
144         default "128"   if (CPU_CK610 || CPU_CK807 || CPU_CK810)
145         default "1024"  if (CPU_CK860)
146
147 config CPU_ASID_BITS
148         int
149         default "8"     if (CPU_CK610 || CPU_CK807 || CPU_CK810)
150         default "12"    if (CPU_CK860)
151
152 config L1_CACHE_SHIFT
153         int
154         default "4"     if (CPU_CK610)
155         default "5"     if (CPU_CK807 || CPU_CK810)
156         default "6"     if (CPU_CK860)
157
158 config ARCH_MMAP_RND_BITS_MIN
159         default 8
160
161 # max bits determined by the following formula:
162 #  VA_BITS - PAGE_SHIFT - 3
163 config ARCH_MMAP_RND_BITS_MAX
164         default 17
165
166 menu "Processor type and features"
167
168 choice
169         prompt "CPU MODEL"
170         default CPU_CK807
171
172 config CPU_CK610
173         bool "CSKY CPU ck610"
174         select CPU_NEED_TLBSYNC
175         select CPU_NEED_SOFTALIGN
176         select CPU_NO_USER_BKPT
177
178 config CPU_CK810
179         bool "CSKY CPU ck810"
180         select CPU_HAS_HILO
181         select CPU_NEED_TLBSYNC
182
183 config CPU_CK807
184         bool "CSKY CPU ck807"
185         select CPU_HAS_HILO
186
187 config CPU_CK860
188         bool "CSKY CPU ck860"
189         select CPU_HAS_TLBI
190         select CPU_HAS_CACHEV2
191         select CPU_HAS_LDSTEX
192         select CPU_HAS_FPUV2
193 endchoice
194
195 choice
196         prompt "PAGE OFFSET"
197         default PAGE_OFFSET_80000000
198
199 config PAGE_OFFSET_80000000
200         bool "PAGE OFFSET 2G (user:kernel = 2:2)"
201
202 config PAGE_OFFSET_A0000000
203         bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)"
204 endchoice
205
206 config PAGE_OFFSET
207         hex
208         default 0x80000000 if PAGE_OFFSET_80000000
209         default 0xa0000000 if PAGE_OFFSET_A0000000
210 choice
211
212         prompt "C-SKY PMU type"
213         depends on PERF_EVENTS
214         depends on CPU_CK807 || CPU_CK810 || CPU_CK860
215
216 config CPU_PMU_NONE
217         bool "None"
218
219 config CSKY_PMU_V1
220         bool "Performance Monitoring Unit Ver.1"
221
222 endchoice
223
224 choice
225         prompt "Power Manager Instruction (wait/doze/stop)"
226         default CPU_PM_NONE
227
228 config CPU_PM_NONE
229         bool "None"
230
231 config CPU_PM_WAIT
232         bool "wait"
233
234 config CPU_PM_DOZE
235         bool "doze"
236
237 config CPU_PM_STOP
238         bool "stop"
239 endchoice
240
241 menuconfig HAVE_TCM
242         bool "Tightly-Coupled/Sram Memory"
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
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
282 config CPU_HAS_ICACHE_INS
283         bool "CPU has Icache invalidate instructions"
284         depends on CPU_HAS_CACHEV2
285
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
299         default "4"
300
301 config HIGHMEM
302         bool "High Memory Support"
303         depends on !CPU_CK610
304         select KMAP_LOCAL
305         default y
306
307 config FORCE_MAX_ZONEORDER
308         int "Maximum zone order"
309         default "11"
310
311 config DRAM_BASE
312         hex "DRAM start addr (the same with memory-section in dts)"
313         default 0x0
314
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.
324 endmenu
325
326 source "arch/csky/Kconfig.platforms"
327
328 source "kernel/Kconfig.hz"