xref: /linux/arch/csky/Kconfig (revision 5b49c82dadfe0f3741778f57385f964ec1514863)
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
6c32e64e8SGuo Ren	select ARCH_HAS_SYNC_DMA_FOR_CPU
7c32e64e8SGuo Ren	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
8c32e64e8SGuo Ren	select ARCH_USE_BUILTIN_BSWAP
9c32e64e8SGuo Ren	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
10c32e64e8SGuo Ren	select COMMON_CLK
11c32e64e8SGuo Ren	select CLKSRC_MMIO
121994cc49SGuo Ren	select CSKY_MPINTC if CPU_CK860
131994cc49SGuo Ren	select CSKY_MP_TIMER if CPU_CK860
141994cc49SGuo Ren	select CSKY_APB_INTC
15f04b951fSChristoph Hellwig	select DMA_DIRECT_REMAP
16c32e64e8SGuo Ren	select IRQ_DOMAIN
17c32e64e8SGuo Ren	select HANDLE_DOMAIN_IRQ
18c32e64e8SGuo Ren	select DW_APB_TIMER_OF
190055f67bSChristoph Hellwig	select GENERIC_IOREMAP
20c32e64e8SGuo Ren	select GENERIC_LIB_ASHLDI3
21c32e64e8SGuo Ren	select GENERIC_LIB_ASHRDI3
22c32e64e8SGuo Ren	select GENERIC_LIB_LSHRDI3
23c32e64e8SGuo Ren	select GENERIC_LIB_MULDI3
24c32e64e8SGuo Ren	select GENERIC_LIB_CMPDI2
25c32e64e8SGuo Ren	select GENERIC_LIB_UCMPDI2
26c32e64e8SGuo Ren	select GENERIC_ALLOCATOR
27c32e64e8SGuo Ren	select GENERIC_ATOMIC64
28c32e64e8SGuo Ren	select GENERIC_CLOCKEVENTS
29c32e64e8SGuo Ren	select GENERIC_CPU_DEVICES
30c32e64e8SGuo Ren	select GENERIC_IRQ_CHIP
31c32e64e8SGuo Ren	select GENERIC_IRQ_PROBE
32c32e64e8SGuo Ren	select GENERIC_IRQ_SHOW
33c32e64e8SGuo Ren	select GENERIC_IRQ_MULTI_HANDLER
34c32e64e8SGuo Ren	select GENERIC_SCHED_CLOCK
35c32e64e8SGuo Ren	select GENERIC_SMP_IDLE_THREAD
361994cc49SGuo Ren	select GX6605S_TIMER if CPU_CK610
37c32e64e8SGuo Ren	select HAVE_ARCH_TRACEHOOK
382f7932b0SGuo Ren	select HAVE_ARCH_AUDITSYSCALL
3928bb030fSGuo Ren	select HAVE_DYNAMIC_FTRACE
40230c77a5SGuo Ren	select HAVE_FUNCTION_TRACER
41d7950be1SGuo Ren	select HAVE_FUNCTION_GRAPH_TRACER
4228bb030fSGuo Ren	select HAVE_FTRACE_MCOUNT_RECORD
43c32e64e8SGuo Ren	select HAVE_KERNEL_GZIP
44c32e64e8SGuo Ren	select HAVE_KERNEL_LZO
45c32e64e8SGuo Ren	select HAVE_KERNEL_LZMA
46f50fd2d8SGuo Ren	select HAVE_PERF_EVENTS
47daac95e7SMao Han	select HAVE_PERF_REGS
48daac95e7SMao Han	select HAVE_PERF_USER_STACK_DUMP
49c32e64e8SGuo Ren	select HAVE_DMA_CONTIGUOUS
502f78c73fSMao Han	select HAVE_STACKPROTECTOR
512f7932b0SGuo Ren	select HAVE_SYSCALL_TRACEPOINTS
52c32e64e8SGuo Ren	select MAY_HAVE_SPARSE_IRQ
53c32e64e8SGuo Ren	select MODULES_USE_ELF_RELA if MODULES
54c32e64e8SGuo Ren	select OF
55c32e64e8SGuo Ren	select OF_EARLY_FLATTREE
56f50fd2d8SGuo Ren	select PERF_USE_VMALLOC if CPU_CK610
57c32e64e8SGuo Ren	select RTC_LIB
58c32e64e8SGuo Ren	select TIMER_OF
59c32e64e8SGuo Ren	select USB_ARCH_HAS_EHCI
60c32e64e8SGuo Ren	select USB_ARCH_HAS_OHCI
61*5b49c82dSMaJun	select GENERIC_PCI_IOMAP
62*5b49c82dSMaJun	select HAVE_PCI
63*5b49c82dSMaJun	select PCI_DOMAINS_GENERIC if PCI
64*5b49c82dSMaJun	select PCI_SYSCALL if PCI
65*5b49c82dSMaJun	select PCI_MSI if PCI
66c32e64e8SGuo Ren
67c32e64e8SGuo Renconfig CPU_HAS_CACHEV2
68c32e64e8SGuo Ren	bool
69c32e64e8SGuo Ren
70c32e64e8SGuo Renconfig CPU_HAS_FPUV2
71c32e64e8SGuo Ren	bool
72c32e64e8SGuo Ren
73c32e64e8SGuo Renconfig CPU_HAS_HILO
74c32e64e8SGuo Ren	bool
75c32e64e8SGuo Ren
76c32e64e8SGuo Renconfig CPU_HAS_TLBI
77c32e64e8SGuo Ren	bool
78c32e64e8SGuo Ren
79c32e64e8SGuo Renconfig CPU_HAS_LDSTEX
80c32e64e8SGuo Ren	bool
81c32e64e8SGuo Ren	help
82bebd26abSRandy Dunlap	  For SMP, CPU needs "ldex&stex" instructions for atomic operations.
83c32e64e8SGuo Ren
84c32e64e8SGuo Renconfig CPU_NEED_TLBSYNC
85c32e64e8SGuo Ren	bool
86c32e64e8SGuo Ren
87c32e64e8SGuo Renconfig CPU_NEED_SOFTALIGN
88c32e64e8SGuo Ren	bool
89c32e64e8SGuo Ren
90c32e64e8SGuo Renconfig CPU_NO_USER_BKPT
91c32e64e8SGuo Ren	bool
92c32e64e8SGuo Ren	help
93c32e64e8SGuo Ren	  For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
94c32e64e8SGuo Ren	  abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
95c32e64e8SGuo Ren	  So we need a 16bit instruction as user space bkpt, and it will cause an illegal
96c32e64e8SGuo Ren	  instruction exception.
97c32e64e8SGuo Ren	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
98c32e64e8SGuo Ren
99c32e64e8SGuo Renconfig GENERIC_CALIBRATE_DELAY
100c32e64e8SGuo Ren	def_bool y
101c32e64e8SGuo Ren
102c32e64e8SGuo Renconfig GENERIC_CSUM
103c32e64e8SGuo Ren	def_bool y
104c32e64e8SGuo Ren
105c32e64e8SGuo Renconfig GENERIC_HWEIGHT
106c32e64e8SGuo Ren	def_bool y
107c32e64e8SGuo Ren
108c32e64e8SGuo Renconfig MMU
109c32e64e8SGuo Ren	def_bool y
110c32e64e8SGuo Ren
1110ea2dc7cSGuo Renconfig STACKTRACE_SUPPORT
1120ea2dc7cSGuo Ren	def_bool y
1130ea2dc7cSGuo Ren
114c32e64e8SGuo Renconfig TIME_LOW_RES
115c32e64e8SGuo Ren	def_bool y
116c32e64e8SGuo Ren
117c32e64e8SGuo Renconfig TRACE_IRQFLAGS_SUPPORT
118c32e64e8SGuo Ren	def_bool y
119c32e64e8SGuo Ren
120c32e64e8SGuo Renconfig CPU_TLB_SIZE
121c32e64e8SGuo Ren	int
122c32e64e8SGuo Ren	default "128"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
123c32e64e8SGuo Ren	default "1024"	if (CPU_CK860)
124c32e64e8SGuo Ren
125c32e64e8SGuo Renconfig CPU_ASID_BITS
126c32e64e8SGuo Ren	int
127c32e64e8SGuo Ren	default "8"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
128c32e64e8SGuo Ren	default "12"	if (CPU_CK860)
129c32e64e8SGuo Ren
130c32e64e8SGuo Renconfig L1_CACHE_SHIFT
131c32e64e8SGuo Ren	int
132c32e64e8SGuo Ren	default "4"	if (CPU_CK610)
133c32e64e8SGuo Ren	default "5"	if (CPU_CK807 || CPU_CK810)
134c32e64e8SGuo Ren	default "6"	if (CPU_CK860)
135c32e64e8SGuo Ren
136c32e64e8SGuo Renmenu "Processor type and features"
137c32e64e8SGuo Ren
138c32e64e8SGuo Renchoice
139c32e64e8SGuo Ren	prompt "CPU MODEL"
140c32e64e8SGuo Ren	default CPU_CK807
141c32e64e8SGuo Ren
142c32e64e8SGuo Renconfig CPU_CK610
143c32e64e8SGuo Ren	bool "CSKY CPU ck610"
144c32e64e8SGuo Ren	select CPU_NEED_TLBSYNC
145c32e64e8SGuo Ren	select CPU_NEED_SOFTALIGN
146c32e64e8SGuo Ren	select CPU_NO_USER_BKPT
147c32e64e8SGuo Ren
148c32e64e8SGuo Renconfig CPU_CK810
149c32e64e8SGuo Ren	bool "CSKY CPU ck810"
150c32e64e8SGuo Ren	select CPU_HAS_HILO
151c32e64e8SGuo Ren	select CPU_NEED_TLBSYNC
152c32e64e8SGuo Ren
153c32e64e8SGuo Renconfig CPU_CK807
154c32e64e8SGuo Ren	bool "CSKY CPU ck807"
155c32e64e8SGuo Ren	select CPU_HAS_HILO
156c32e64e8SGuo Ren
157c32e64e8SGuo Renconfig CPU_CK860
158c32e64e8SGuo Ren	bool "CSKY CPU ck860"
159c32e64e8SGuo Ren	select CPU_HAS_TLBI
160c32e64e8SGuo Ren	select CPU_HAS_CACHEV2
161c32e64e8SGuo Ren	select CPU_HAS_LDSTEX
162c32e64e8SGuo Ren	select CPU_HAS_FPUV2
163c32e64e8SGuo Renendchoice
164c32e64e8SGuo Ren
165c32e64e8SGuo Renchoice
166f50fd2d8SGuo Ren	prompt "C-SKY PMU type"
167f50fd2d8SGuo Ren	depends on PERF_EVENTS
168f50fd2d8SGuo Ren	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
169f50fd2d8SGuo Ren
170f50fd2d8SGuo Renconfig CPU_PMU_NONE
171f50fd2d8SGuo Ren	bool "None"
172f50fd2d8SGuo Ren
173f50fd2d8SGuo Renconfig CSKY_PMU_V1
174f50fd2d8SGuo Ren	bool "Performance Monitoring Unit Ver.1"
175f50fd2d8SGuo Ren
176f50fd2d8SGuo Renendchoice
177f50fd2d8SGuo Ren
178f50fd2d8SGuo Renchoice
179c32e64e8SGuo Ren	prompt "Power Manager Instruction (wait/doze/stop)"
180c32e64e8SGuo Ren	default CPU_PM_NONE
181c32e64e8SGuo Ren
182c32e64e8SGuo Renconfig CPU_PM_NONE
183c32e64e8SGuo Ren	bool "None"
184c32e64e8SGuo Ren
185c32e64e8SGuo Renconfig CPU_PM_WAIT
186c32e64e8SGuo Ren	bool "wait"
187c32e64e8SGuo Ren
188c32e64e8SGuo Renconfig CPU_PM_DOZE
189c32e64e8SGuo Ren	bool "doze"
190c32e64e8SGuo Ren
191c32e64e8SGuo Renconfig CPU_PM_STOP
192c32e64e8SGuo Ren	bool "stop"
193c32e64e8SGuo Renendchoice
194c32e64e8SGuo Ren
195f525bb2cSGuo Renmenuconfig HAVE_TCM
196f525bb2cSGuo Ren	bool "Tightly-Coupled/Sram Memory"
197f525bb2cSGuo Ren	select GENERIC_ALLOCATOR
198f525bb2cSGuo Ren	help
199f525bb2cSGuo Ren	  The implementation are not only used by TCM (Tightly-Coupled Meory)
200f525bb2cSGuo Ren	  but also used by sram on SOC bus. It follow existed linux tcm
201f525bb2cSGuo Ren	  software interface, so that old tcm application codes could be
202f525bb2cSGuo Ren	  re-used directly.
203f525bb2cSGuo Ren
204f525bb2cSGuo Renif HAVE_TCM
205f525bb2cSGuo Renconfig ITCM_RAM_BASE
206f525bb2cSGuo Ren	hex "ITCM ram base"
207f525bb2cSGuo Ren	default 0xffffffff
208f525bb2cSGuo Ren
209f525bb2cSGuo Renconfig ITCM_NR_PAGES
210f525bb2cSGuo Ren	int "Page count of ITCM size: NR*4KB"
211f525bb2cSGuo Ren	range 1 256
212f525bb2cSGuo Ren	default 32
213f525bb2cSGuo Ren
214f525bb2cSGuo Renconfig HAVE_DTCM
215f525bb2cSGuo Ren	bool "DTCM Support"
216f525bb2cSGuo Ren
217f525bb2cSGuo Renconfig DTCM_RAM_BASE
218f525bb2cSGuo Ren	hex "DTCM ram base"
219f525bb2cSGuo Ren	depends on HAVE_DTCM
220f525bb2cSGuo Ren	default 0xffffffff
221f525bb2cSGuo Ren
222f525bb2cSGuo Renconfig DTCM_NR_PAGES
223f525bb2cSGuo Ren	int "Page count of DTCM size: NR*4KB"
224f525bb2cSGuo Ren	depends on HAVE_DTCM
225f525bb2cSGuo Ren	range 1 256
226f525bb2cSGuo Ren	default 32
227f525bb2cSGuo Renendif
228f525bb2cSGuo Ren
229c32e64e8SGuo Renconfig CPU_HAS_VDSP
230c32e64e8SGuo Ren	bool "CPU has VDSP coprocessor"
231c32e64e8SGuo Ren	depends on CPU_HAS_FPU && CPU_HAS_FPUV2
232c32e64e8SGuo Ren
233c32e64e8SGuo Renconfig CPU_HAS_FPU
234c32e64e8SGuo Ren	bool "CPU has FPU coprocessor"
235c32e64e8SGuo Ren	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
236c32e64e8SGuo Ren
237761b4f69SGuo Renconfig CPU_HAS_ICACHE_INS
238761b4f69SGuo Ren	bool "CPU has Icache invalidate instructions"
239761b4f69SGuo Ren	depends on CPU_HAS_CACHEV2
240761b4f69SGuo Ren
241c32e64e8SGuo Renconfig CPU_HAS_TEE
242c32e64e8SGuo Ren	bool "CPU has Trusted Execution Environment"
243c32e64e8SGuo Ren	depends on CPU_CK810
244c32e64e8SGuo Ren
245c32e64e8SGuo Renconfig SMP
246c32e64e8SGuo Ren	bool "Symmetric Multi-Processing (SMP) support for C-SKY"
247c32e64e8SGuo Ren	depends on CPU_CK860
248c32e64e8SGuo Ren	default n
249c32e64e8SGuo Ren
250c32e64e8SGuo Renconfig NR_CPUS
251c32e64e8SGuo Ren	int "Maximum number of CPUs (2-32)"
252c32e64e8SGuo Ren	range 2 32
253c32e64e8SGuo Ren	depends on SMP
254c32e64e8SGuo Ren	default "2"
255c32e64e8SGuo Ren
256c32e64e8SGuo Renconfig HIGHMEM
257c32e64e8SGuo Ren	bool "High Memory Support"
258c32e64e8SGuo Ren	depends on !CPU_CK610
259c32e64e8SGuo Ren	default y
260c32e64e8SGuo Ren
261c32e64e8SGuo Renconfig FORCE_MAX_ZONEORDER
262c32e64e8SGuo Ren	int "Maximum zone order"
263c32e64e8SGuo Ren	default "11"
264c32e64e8SGuo Ren
265c32e64e8SGuo Renconfig RAM_BASE
266c32e64e8SGuo Ren	hex "DRAM start addr (the same with memory-section in dts)"
267c32e64e8SGuo Ren	default 0x0
268c32e64e8SGuo Ren
269859e5f45SGuo Renconfig HOTPLUG_CPU
270859e5f45SGuo Ren	bool "Support for hot-pluggable CPUs"
271859e5f45SGuo Ren	select GENERIC_IRQ_MIGRATION
272859e5f45SGuo Ren	depends on SMP
273859e5f45SGuo Ren	help
274859e5f45SGuo Ren	  Say Y here to allow turning CPUs off and on. CPUs can be
275859e5f45SGuo Ren	  controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
276859e5f45SGuo Ren
277859e5f45SGuo Ren	  Say N if you want to disable CPU hotplug.
278c32e64e8SGuo Renendmenu
279c32e64e8SGuo Ren
280a736fa1eSGuo Rensource "arch/csky/Kconfig.platforms"
281a736fa1eSGuo Ren
282c32e64e8SGuo Rensource "kernel/Kconfig.hz"
283