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