xref: /linux/arch/csky/Kconfig (revision 5af627a043e39d3226eecd75753dcd2c920c16ec)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2c32e64e8SGuo Renconfig CSKY
3c32e64e8SGuo Ren	def_bool y
4942fa985SYury Norov	select ARCH_32BIT_OFF_T
513bf5cedSChristoph Hellwig	select ARCH_HAS_DMA_PREP_COHERENT
6de863678SMa Jun	select ARCH_HAS_GCOV_PROFILE_ALL
7c32e64e8SGuo Ren	select ARCH_HAS_SYNC_DMA_FOR_CPU
8c32e64e8SGuo Ren	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
9c32e64e8SGuo Ren	select ARCH_USE_BUILTIN_BSWAP
10c32e64e8SGuo Ren	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
1118c07d23SGuo Ren	select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
12953131e5SGuo Ren	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
13c32e64e8SGuo Ren	select COMMON_CLK
14c32e64e8SGuo Ren	select CLKSRC_MMIO
151994cc49SGuo Ren	select CSKY_MPINTC if CPU_CK860
161994cc49SGuo Ren	select CSKY_MP_TIMER if CPU_CK860
171994cc49SGuo Ren	select CSKY_APB_INTC
18f04b951fSChristoph Hellwig	select DMA_DIRECT_REMAP
19c32e64e8SGuo Ren	select IRQ_DOMAIN
20c32e64e8SGuo Ren	select HANDLE_DOMAIN_IRQ
21c32e64e8SGuo Ren	select DW_APB_TIMER_OF
220055f67bSChristoph Hellwig	select GENERIC_IOREMAP
23c32e64e8SGuo Ren	select GENERIC_LIB_ASHLDI3
24c32e64e8SGuo Ren	select GENERIC_LIB_ASHRDI3
25c32e64e8SGuo Ren	select GENERIC_LIB_LSHRDI3
26c32e64e8SGuo Ren	select GENERIC_LIB_MULDI3
27c32e64e8SGuo Ren	select GENERIC_LIB_CMPDI2
28c32e64e8SGuo Ren	select GENERIC_LIB_UCMPDI2
29c32e64e8SGuo Ren	select GENERIC_ALLOCATOR
30c32e64e8SGuo Ren	select GENERIC_ATOMIC64
31c32e64e8SGuo Ren	select GENERIC_CLOCKEVENTS
32c32e64e8SGuo Ren	select GENERIC_CPU_DEVICES
33c32e64e8SGuo Ren	select GENERIC_IRQ_CHIP
34c32e64e8SGuo Ren	select GENERIC_IRQ_PROBE
35c32e64e8SGuo Ren	select GENERIC_IRQ_SHOW
36c32e64e8SGuo Ren	select GENERIC_IRQ_MULTI_HANDLER
37c32e64e8SGuo Ren	select GENERIC_SCHED_CLOCK
38c32e64e8SGuo Ren	select GENERIC_SMP_IDLE_THREAD
391994cc49SGuo Ren	select GX6605S_TIMER if CPU_CK610
40c32e64e8SGuo Ren	select HAVE_ARCH_TRACEHOOK
412f7932b0SGuo Ren	select HAVE_ARCH_AUDITSYSCALL
42953131e5SGuo Ren	select HAVE_ARCH_MMAP_RND_BITS
43e95a4f8cSGuo Ren	select HAVE_ARCH_SECCOMP_FILTER
44bdcd93efSGuo Ren	select HAVE_CONTEXT_TRACKING
45bdcd93efSGuo Ren	select HAVE_VIRT_CPU_ACCOUNTING_GEN
4618c07d23SGuo Ren	select HAVE_DEBUG_BUGVERBOSE
4728bb030fSGuo Ren	select HAVE_DYNAMIC_FTRACE
4889a3927aSGuo Ren	select HAVE_DYNAMIC_FTRACE_WITH_REGS
49230c77a5SGuo Ren	select HAVE_FUNCTION_TRACER
50d7950be1SGuo Ren	select HAVE_FUNCTION_GRAPH_TRACER
5171e193d7SGuo Ren	select HAVE_FUNCTION_ERROR_INJECTION
5228bb030fSGuo Ren	select HAVE_FTRACE_MCOUNT_RECORD
53c32e64e8SGuo Ren	select HAVE_KERNEL_GZIP
54c32e64e8SGuo Ren	select HAVE_KERNEL_LZO
55c32e64e8SGuo Ren	select HAVE_KERNEL_LZMA
5633e53ae1SGuo Ren	select HAVE_KPROBES if !CPU_CK610
5733e53ae1SGuo Ren	select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
5833e53ae1SGuo Ren	select HAVE_KRETPROBES if !CPU_CK610
59f50fd2d8SGuo Ren	select HAVE_PERF_EVENTS
60daac95e7SMao Han	select HAVE_PERF_REGS
61daac95e7SMao Han	select HAVE_PERF_USER_STACK_DUMP
62c32e64e8SGuo Ren	select HAVE_DMA_CONTIGUOUS
63bfe47f35SGuo Ren	select HAVE_REGS_AND_STACK_ACCESS_API
649866d141SGuo Ren	select HAVE_RSEQ
652f78c73fSMao Han	select HAVE_STACKPROTECTOR
662f7932b0SGuo Ren	select HAVE_SYSCALL_TRACEPOINTS
67c32e64e8SGuo Ren	select MAY_HAVE_SPARSE_IRQ
68c32e64e8SGuo Ren	select MODULES_USE_ELF_RELA if MODULES
69c32e64e8SGuo Ren	select OF
70c32e64e8SGuo Ren	select OF_EARLY_FLATTREE
71f50fd2d8SGuo Ren	select PERF_USE_VMALLOC if CPU_CK610
72c32e64e8SGuo Ren	select RTC_LIB
73c32e64e8SGuo Ren	select TIMER_OF
74c32e64e8SGuo Ren	select USB_ARCH_HAS_EHCI
75c32e64e8SGuo Ren	select USB_ARCH_HAS_OHCI
765b49c82dSMaJun	select GENERIC_PCI_IOMAP
775b49c82dSMaJun	select HAVE_PCI
785b49c82dSMaJun	select PCI_DOMAINS_GENERIC if PCI
795b49c82dSMaJun	select PCI_SYSCALL if PCI
805b49c82dSMaJun	select PCI_MSI if PCI
815e6e9852SChristoph Hellwig	select SET_FS
82c32e64e8SGuo Ren
83000591f1SGuo Renconfig LOCKDEP_SUPPORT
84000591f1SGuo Ren	def_bool y
85000591f1SGuo Ren
868f6bb793SGuo Renconfig ARCH_SUPPORTS_UPROBES
878f6bb793SGuo Ren	def_bool y if !CPU_CK610
888f6bb793SGuo Ren
89c32e64e8SGuo Renconfig CPU_HAS_CACHEV2
90c32e64e8SGuo Ren	bool
91c32e64e8SGuo Ren
92c32e64e8SGuo Renconfig CPU_HAS_FPUV2
93c32e64e8SGuo Ren	bool
94c32e64e8SGuo Ren
95c32e64e8SGuo Renconfig CPU_HAS_HILO
96c32e64e8SGuo Ren	bool
97c32e64e8SGuo Ren
98c32e64e8SGuo Renconfig CPU_HAS_TLBI
99c32e64e8SGuo Ren	bool
100c32e64e8SGuo Ren
101c32e64e8SGuo Renconfig CPU_HAS_LDSTEX
102c32e64e8SGuo Ren	bool
103c32e64e8SGuo Ren	help
104bebd26abSRandy Dunlap	  For SMP, CPU needs "ldex&stex" instructions for atomic operations.
105c32e64e8SGuo Ren
106c32e64e8SGuo Renconfig CPU_NEED_TLBSYNC
107c32e64e8SGuo Ren	bool
108c32e64e8SGuo Ren
109c32e64e8SGuo Renconfig CPU_NEED_SOFTALIGN
110c32e64e8SGuo Ren	bool
111c32e64e8SGuo Ren
112c32e64e8SGuo Renconfig CPU_NO_USER_BKPT
113c32e64e8SGuo Ren	bool
114c32e64e8SGuo Ren	help
115c32e64e8SGuo Ren	  For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
116c32e64e8SGuo Ren	  abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
117c32e64e8SGuo Ren	  So we need a 16bit instruction as user space bkpt, and it will cause an illegal
118c32e64e8SGuo Ren	  instruction exception.
119c32e64e8SGuo Ren	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
120c32e64e8SGuo Ren
121c32e64e8SGuo Renconfig GENERIC_CALIBRATE_DELAY
122c32e64e8SGuo Ren	def_bool y
123c32e64e8SGuo Ren
124c32e64e8SGuo Renconfig GENERIC_CSUM
125c32e64e8SGuo Ren	def_bool y
126c32e64e8SGuo Ren
127c32e64e8SGuo Renconfig GENERIC_HWEIGHT
128c32e64e8SGuo Ren	def_bool y
129c32e64e8SGuo Ren
130c32e64e8SGuo Renconfig MMU
131c32e64e8SGuo Ren	def_bool y
132c32e64e8SGuo Ren
1330ea2dc7cSGuo Renconfig STACKTRACE_SUPPORT
1340ea2dc7cSGuo Ren	def_bool y
1350ea2dc7cSGuo Ren
136c32e64e8SGuo Renconfig TIME_LOW_RES
137c32e64e8SGuo Ren	def_bool y
138c32e64e8SGuo Ren
139c32e64e8SGuo Renconfig TRACE_IRQFLAGS_SUPPORT
140c32e64e8SGuo Ren	def_bool y
141c32e64e8SGuo Ren
142c32e64e8SGuo Renconfig CPU_TLB_SIZE
143c32e64e8SGuo Ren	int
144c32e64e8SGuo Ren	default "128"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
145c32e64e8SGuo Ren	default "1024"	if (CPU_CK860)
146c32e64e8SGuo Ren
147c32e64e8SGuo Renconfig CPU_ASID_BITS
148c32e64e8SGuo Ren	int
149c32e64e8SGuo Ren	default "8"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
150c32e64e8SGuo Ren	default "12"	if (CPU_CK860)
151c32e64e8SGuo Ren
152c32e64e8SGuo Renconfig L1_CACHE_SHIFT
153c32e64e8SGuo Ren	int
154c32e64e8SGuo Ren	default "4"	if (CPU_CK610)
155c32e64e8SGuo Ren	default "5"	if (CPU_CK807 || CPU_CK810)
156c32e64e8SGuo Ren	default "6"	if (CPU_CK860)
157c32e64e8SGuo Ren
158953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MIN
159953131e5SGuo Ren	default 8
160953131e5SGuo Ren
161953131e5SGuo Ren# max bits determined by the following formula:
162953131e5SGuo Ren#  VA_BITS - PAGE_SHIFT - 3
163953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MAX
164953131e5SGuo Ren	default 17
165953131e5SGuo Ren
166c32e64e8SGuo Renmenu "Processor type and features"
167c32e64e8SGuo Ren
168c32e64e8SGuo Renchoice
169c32e64e8SGuo Ren	prompt "CPU MODEL"
170c32e64e8SGuo Ren	default CPU_CK807
171c32e64e8SGuo Ren
172c32e64e8SGuo Renconfig CPU_CK610
173c32e64e8SGuo Ren	bool "CSKY CPU ck610"
174c32e64e8SGuo Ren	select CPU_NEED_TLBSYNC
175c32e64e8SGuo Ren	select CPU_NEED_SOFTALIGN
176c32e64e8SGuo Ren	select CPU_NO_USER_BKPT
177c32e64e8SGuo Ren
178c32e64e8SGuo Renconfig CPU_CK810
179c32e64e8SGuo Ren	bool "CSKY CPU ck810"
180c32e64e8SGuo Ren	select CPU_HAS_HILO
181c32e64e8SGuo Ren	select CPU_NEED_TLBSYNC
182c32e64e8SGuo Ren
183c32e64e8SGuo Renconfig CPU_CK807
184c32e64e8SGuo Ren	bool "CSKY CPU ck807"
185c32e64e8SGuo Ren	select CPU_HAS_HILO
186c32e64e8SGuo Ren
187c32e64e8SGuo Renconfig CPU_CK860
188c32e64e8SGuo Ren	bool "CSKY CPU ck860"
189c32e64e8SGuo Ren	select CPU_HAS_TLBI
190c32e64e8SGuo Ren	select CPU_HAS_CACHEV2
191c32e64e8SGuo Ren	select CPU_HAS_LDSTEX
192c32e64e8SGuo Ren	select CPU_HAS_FPUV2
193c32e64e8SGuo Renendchoice
194c32e64e8SGuo Ren
195c32e64e8SGuo Renchoice
196f50fd2d8SGuo Ren	prompt "C-SKY PMU type"
197f50fd2d8SGuo Ren	depends on PERF_EVENTS
198f50fd2d8SGuo Ren	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
199f50fd2d8SGuo Ren
200f50fd2d8SGuo Renconfig CPU_PMU_NONE
201f50fd2d8SGuo Ren	bool "None"
202f50fd2d8SGuo Ren
203f50fd2d8SGuo Renconfig CSKY_PMU_V1
204f50fd2d8SGuo Ren	bool "Performance Monitoring Unit Ver.1"
205f50fd2d8SGuo Ren
206f50fd2d8SGuo Renendchoice
207f50fd2d8SGuo Ren
208f50fd2d8SGuo Renchoice
209c32e64e8SGuo Ren	prompt "Power Manager Instruction (wait/doze/stop)"
210c32e64e8SGuo Ren	default CPU_PM_NONE
211c32e64e8SGuo Ren
212c32e64e8SGuo Renconfig CPU_PM_NONE
213c32e64e8SGuo Ren	bool "None"
214c32e64e8SGuo Ren
215c32e64e8SGuo Renconfig CPU_PM_WAIT
216c32e64e8SGuo Ren	bool "wait"
217c32e64e8SGuo Ren
218c32e64e8SGuo Renconfig CPU_PM_DOZE
219c32e64e8SGuo Ren	bool "doze"
220c32e64e8SGuo Ren
221c32e64e8SGuo Renconfig CPU_PM_STOP
222c32e64e8SGuo Ren	bool "stop"
223c32e64e8SGuo Renendchoice
224c32e64e8SGuo Ren
225f525bb2cSGuo Renmenuconfig HAVE_TCM
226f525bb2cSGuo Ren	bool "Tightly-Coupled/Sram Memory"
227f525bb2cSGuo Ren	select GENERIC_ALLOCATOR
228f525bb2cSGuo Ren	help
229f525bb2cSGuo Ren	  The implementation are not only used by TCM (Tightly-Coupled Meory)
230f525bb2cSGuo Ren	  but also used by sram on SOC bus. It follow existed linux tcm
231f525bb2cSGuo Ren	  software interface, so that old tcm application codes could be
232f525bb2cSGuo Ren	  re-used directly.
233f525bb2cSGuo Ren
234f525bb2cSGuo Renif HAVE_TCM
235f525bb2cSGuo Renconfig ITCM_RAM_BASE
236f525bb2cSGuo Ren	hex "ITCM ram base"
237f525bb2cSGuo Ren	default 0xffffffff
238f525bb2cSGuo Ren
239f525bb2cSGuo Renconfig ITCM_NR_PAGES
240f525bb2cSGuo Ren	int "Page count of ITCM size: NR*4KB"
241f525bb2cSGuo Ren	range 1 256
242f525bb2cSGuo Ren	default 32
243f525bb2cSGuo Ren
244f525bb2cSGuo Renconfig HAVE_DTCM
245f525bb2cSGuo Ren	bool "DTCM Support"
246f525bb2cSGuo Ren
247f525bb2cSGuo Renconfig DTCM_RAM_BASE
248f525bb2cSGuo Ren	hex "DTCM ram base"
249f525bb2cSGuo Ren	depends on HAVE_DTCM
250f525bb2cSGuo Ren	default 0xffffffff
251f525bb2cSGuo Ren
252f525bb2cSGuo Renconfig DTCM_NR_PAGES
253f525bb2cSGuo Ren	int "Page count of DTCM size: NR*4KB"
254f525bb2cSGuo Ren	depends on HAVE_DTCM
255f525bb2cSGuo Ren	range 1 256
256f525bb2cSGuo Ren	default 32
257f525bb2cSGuo Renendif
258f525bb2cSGuo Ren
259c32e64e8SGuo Renconfig CPU_HAS_VDSP
260c32e64e8SGuo Ren	bool "CPU has VDSP coprocessor"
261c32e64e8SGuo Ren	depends on CPU_HAS_FPU && CPU_HAS_FPUV2
262c32e64e8SGuo Ren
263c32e64e8SGuo Renconfig CPU_HAS_FPU
264c32e64e8SGuo Ren	bool "CPU has FPU coprocessor"
265c32e64e8SGuo Ren	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
266c32e64e8SGuo Ren
267761b4f69SGuo Renconfig CPU_HAS_ICACHE_INS
268761b4f69SGuo Ren	bool "CPU has Icache invalidate instructions"
269761b4f69SGuo Ren	depends on CPU_HAS_CACHEV2
270761b4f69SGuo Ren
271c32e64e8SGuo Renconfig CPU_HAS_TEE
272c32e64e8SGuo Ren	bool "CPU has Trusted Execution Environment"
273c32e64e8SGuo Ren	depends on CPU_CK810
274c32e64e8SGuo Ren
275c32e64e8SGuo Renconfig SMP
276c32e64e8SGuo Ren	bool "Symmetric Multi-Processing (SMP) support for C-SKY"
277c32e64e8SGuo Ren	depends on CPU_CK860
278c32e64e8SGuo Ren	default n
279c32e64e8SGuo Ren
280c32e64e8SGuo Renconfig NR_CPUS
281c32e64e8SGuo Ren	int "Maximum number of CPUs (2-32)"
282c32e64e8SGuo Ren	range 2 32
283c32e64e8SGuo Ren	depends on SMP
28450d23a1cSGuo Ren	default "4"
285c32e64e8SGuo Ren
286c32e64e8SGuo Renconfig HIGHMEM
287c32e64e8SGuo Ren	bool "High Memory Support"
288c32e64e8SGuo Ren	depends on !CPU_CK610
289*5af627a0SThomas Gleixner	select KMAP_LOCAL
290c32e64e8SGuo Ren	default y
291c32e64e8SGuo Ren
292c32e64e8SGuo Renconfig FORCE_MAX_ZONEORDER
293c32e64e8SGuo Ren	int "Maximum zone order"
294c32e64e8SGuo Ren	default "11"
295c32e64e8SGuo Ren
296c32e64e8SGuo Renconfig RAM_BASE
297c32e64e8SGuo Ren	hex "DRAM start addr (the same with memory-section in dts)"
298c32e64e8SGuo Ren	default 0x0
299c32e64e8SGuo Ren
300859e5f45SGuo Renconfig HOTPLUG_CPU
301859e5f45SGuo Ren	bool "Support for hot-pluggable CPUs"
302859e5f45SGuo Ren	select GENERIC_IRQ_MIGRATION
303859e5f45SGuo Ren	depends on SMP
304859e5f45SGuo Ren	help
305859e5f45SGuo Ren	  Say Y here to allow turning CPUs off and on. CPUs can be
306859e5f45SGuo Ren	  controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
307859e5f45SGuo Ren
308859e5f45SGuo Ren	  Say N if you want to disable CPU hotplug.
309c32e64e8SGuo Renendmenu
310c32e64e8SGuo Ren
311a736fa1eSGuo Rensource "arch/csky/Kconfig.platforms"
312a736fa1eSGuo Ren
313c32e64e8SGuo Rensource "kernel/Kconfig.hz"
314