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