xref: /openbmc/linux/arch/csky/Kconfig (revision ae213c44)
1# SPDX-License-Identifier: GPL-2.0-only
2config CSKY
3	def_bool y
4	select ARCH_32BIT_OFF_T
5	select ARCH_HAS_DMA_PREP_COHERENT
6	select ARCH_HAS_SYNC_DMA_FOR_CPU
7	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
8	select ARCH_USE_BUILTIN_BSWAP
9	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
10	select COMMON_CLK
11	select CLKSRC_MMIO
12	select CLKSRC_OF
13	select DMA_DIRECT_REMAP
14	select IRQ_DOMAIN
15	select HANDLE_DOMAIN_IRQ
16	select DW_APB_TIMER_OF
17	select GENERIC_LIB_ASHLDI3
18	select GENERIC_LIB_ASHRDI3
19	select GENERIC_LIB_LSHRDI3
20	select GENERIC_LIB_MULDI3
21	select GENERIC_LIB_CMPDI2
22	select GENERIC_LIB_UCMPDI2
23	select GENERIC_ALLOCATOR
24	select GENERIC_ATOMIC64
25	select GENERIC_CLOCKEVENTS
26	select GENERIC_CPU_DEVICES
27	select GENERIC_IRQ_CHIP
28	select GENERIC_IRQ_PROBE
29	select GENERIC_IRQ_SHOW
30	select GENERIC_IRQ_MULTI_HANDLER
31	select GENERIC_SCHED_CLOCK
32	select GENERIC_SMP_IDLE_THREAD
33	select HAVE_ARCH_TRACEHOOK
34	select HAVE_ARCH_AUDITSYSCALL
35	select HAVE_DYNAMIC_FTRACE
36	select HAVE_FUNCTION_TRACER
37	select HAVE_FUNCTION_GRAPH_TRACER
38	select HAVE_FTRACE_MCOUNT_RECORD
39	select HAVE_KERNEL_GZIP
40	select HAVE_KERNEL_LZO
41	select HAVE_KERNEL_LZMA
42	select HAVE_PERF_EVENTS
43	select HAVE_PERF_REGS
44	select HAVE_PERF_USER_STACK_DUMP
45	select HAVE_DMA_API_DEBUG
46	select HAVE_DMA_CONTIGUOUS
47	select HAVE_SYSCALL_TRACEPOINTS
48	select MAY_HAVE_SPARSE_IRQ
49	select MODULES_USE_ELF_RELA if MODULES
50	select OF
51	select OF_EARLY_FLATTREE
52	select PERF_USE_VMALLOC if CPU_CK610
53	select RTC_LIB
54	select TIMER_OF
55	select USB_ARCH_HAS_EHCI
56	select USB_ARCH_HAS_OHCI
57
58config CPU_HAS_CACHEV2
59	bool
60
61config CPU_HAS_FPUV2
62	bool
63
64config CPU_HAS_HILO
65	bool
66
67config CPU_HAS_TLBI
68	bool
69
70config CPU_HAS_LDSTEX
71	bool
72	help
73	  For SMP, CPU needs "ldex&stex" instrcutions to atomic operations.
74
75config CPU_NEED_TLBSYNC
76	bool
77
78config CPU_NEED_SOFTALIGN
79	bool
80
81config CPU_NO_USER_BKPT
82	bool
83	help
84	  For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
85	  abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
86	  So we need a 16bit instruction as user space bkpt, and it will cause an illegal
87	  instruction exception.
88	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
89
90config GENERIC_CALIBRATE_DELAY
91	def_bool y
92
93config GENERIC_CSUM
94	def_bool y
95
96config GENERIC_HWEIGHT
97	def_bool y
98
99config MMU
100	def_bool y
101
102config STACKTRACE_SUPPORT
103	def_bool y
104
105config TIME_LOW_RES
106	def_bool y
107
108config TRACE_IRQFLAGS_SUPPORT
109	def_bool y
110
111config CPU_TLB_SIZE
112	int
113	default "128"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
114	default "1024"	if (CPU_CK860)
115
116config CPU_ASID_BITS
117	int
118	default "8"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
119	default "12"	if (CPU_CK860)
120
121config L1_CACHE_SHIFT
122	int
123	default "4"	if (CPU_CK610)
124	default "5"	if (CPU_CK807 || CPU_CK810)
125	default "6"	if (CPU_CK860)
126
127menu "Processor type and features"
128
129choice
130	prompt "CPU MODEL"
131	default CPU_CK807
132
133config CPU_CK610
134	bool "CSKY CPU ck610"
135	select CPU_NEED_TLBSYNC
136	select CPU_NEED_SOFTALIGN
137	select CPU_NO_USER_BKPT
138
139config CPU_CK810
140	bool "CSKY CPU ck810"
141	select CPU_HAS_HILO
142	select CPU_NEED_TLBSYNC
143
144config CPU_CK807
145	bool "CSKY CPU ck807"
146	select CPU_HAS_HILO
147
148config CPU_CK860
149	bool "CSKY CPU ck860"
150	select CPU_HAS_TLBI
151	select CPU_HAS_CACHEV2
152	select CPU_HAS_LDSTEX
153	select CPU_HAS_FPUV2
154endchoice
155
156choice
157	prompt "C-SKY PMU type"
158	depends on PERF_EVENTS
159	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
160
161config CPU_PMU_NONE
162	bool "None"
163
164config CSKY_PMU_V1
165	bool "Performance Monitoring Unit Ver.1"
166
167endchoice
168
169choice
170	prompt "Power Manager Instruction (wait/doze/stop)"
171	default CPU_PM_NONE
172
173config CPU_PM_NONE
174	bool "None"
175
176config CPU_PM_WAIT
177	bool "wait"
178
179config CPU_PM_DOZE
180	bool "doze"
181
182config CPU_PM_STOP
183	bool "stop"
184endchoice
185
186config CPU_HAS_VDSP
187	bool "CPU has VDSP coprocessor"
188	depends on CPU_HAS_FPU && CPU_HAS_FPUV2
189
190config CPU_HAS_FPU
191	bool "CPU has FPU coprocessor"
192	depends on CPU_CK807 || CPU_CK810 || CPU_CK860
193
194config CPU_HAS_TEE
195	bool "CPU has Trusted Execution Environment"
196	depends on CPU_CK810
197
198config SMP
199	bool "Symmetric Multi-Processing (SMP) support for C-SKY"
200	depends on CPU_CK860
201	default n
202
203config NR_CPUS
204	int "Maximum number of CPUs (2-32)"
205	range 2 32
206	depends on SMP
207	default "2"
208
209config HIGHMEM
210	bool "High Memory Support"
211	depends on !CPU_CK610
212	default y
213
214config FORCE_MAX_ZONEORDER
215	int "Maximum zone order"
216	default "11"
217
218config RAM_BASE
219	hex "DRAM start addr (the same with memory-section in dts)"
220	default 0x0
221
222config HOTPLUG_CPU
223	bool "Support for hot-pluggable CPUs"
224	select GENERIC_IRQ_MIGRATION
225	depends on SMP
226	help
227	  Say Y here to allow turning CPUs off and on. CPUs can be
228	  controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
229
230	  Say N if you want to disable CPU hotplug.
231endmenu
232
233source "kernel/Kconfig.hz"
234