]> asedeno.scripts.mit.edu Git - linux.git/blob - arch/csky/Kconfig
csky: Add PCI support
[linux.git] / arch / csky / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 config 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 CSKY_MPINTC if CPU_CK860
13         select CSKY_MP_TIMER if CPU_CK860
14         select CSKY_APB_INTC
15         select DMA_DIRECT_REMAP
16         select IRQ_DOMAIN
17         select HANDLE_DOMAIN_IRQ
18         select DW_APB_TIMER_OF
19         select GENERIC_IOREMAP
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
36         select GX6605S_TIMER if CPU_CK610
37         select HAVE_ARCH_TRACEHOOK
38         select HAVE_ARCH_AUDITSYSCALL
39         select HAVE_DYNAMIC_FTRACE
40         select HAVE_FUNCTION_TRACER
41         select HAVE_FUNCTION_GRAPH_TRACER
42         select HAVE_FTRACE_MCOUNT_RECORD
43         select HAVE_KERNEL_GZIP
44         select HAVE_KERNEL_LZO
45         select HAVE_KERNEL_LZMA
46         select HAVE_PERF_EVENTS
47         select HAVE_PERF_REGS
48         select HAVE_PERF_USER_STACK_DUMP
49         select HAVE_DMA_CONTIGUOUS
50         select HAVE_STACKPROTECTOR
51         select HAVE_SYSCALL_TRACEPOINTS
52         select MAY_HAVE_SPARSE_IRQ
53         select MODULES_USE_ELF_RELA if MODULES
54         select OF
55         select OF_EARLY_FLATTREE
56         select PERF_USE_VMALLOC if CPU_CK610
57         select RTC_LIB
58         select TIMER_OF
59         select USB_ARCH_HAS_EHCI
60         select USB_ARCH_HAS_OHCI
61         select GENERIC_PCI_IOMAP
62         select HAVE_PCI
63         select PCI_DOMAINS_GENERIC if PCI
64         select PCI_SYSCALL if PCI
65         select PCI_MSI if PCI
66
67 config CPU_HAS_CACHEV2
68         bool
69
70 config CPU_HAS_FPUV2
71         bool
72
73 config CPU_HAS_HILO
74         bool
75
76 config CPU_HAS_TLBI
77         bool
78
79 config CPU_HAS_LDSTEX
80         bool
81         help
82           For SMP, CPU needs "ldex&stex" instructions for atomic operations.
83
84 config CPU_NEED_TLBSYNC
85         bool
86
87 config CPU_NEED_SOFTALIGN
88         bool
89
90 config CPU_NO_USER_BKPT
91         bool
92         help
93           For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
94           abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
95           So we need a 16bit instruction as user space bkpt, and it will cause an illegal
96           instruction exception.
97           In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
98
99 config GENERIC_CALIBRATE_DELAY
100         def_bool y
101
102 config GENERIC_CSUM
103         def_bool y
104
105 config GENERIC_HWEIGHT
106         def_bool y
107
108 config MMU
109         def_bool y
110
111 config STACKTRACE_SUPPORT
112         def_bool y
113
114 config TIME_LOW_RES
115         def_bool y
116
117 config TRACE_IRQFLAGS_SUPPORT
118         def_bool y
119
120 config CPU_TLB_SIZE
121         int
122         default "128"   if (CPU_CK610 || CPU_CK807 || CPU_CK810)
123         default "1024"  if (CPU_CK860)
124
125 config CPU_ASID_BITS
126         int
127         default "8"     if (CPU_CK610 || CPU_CK807 || CPU_CK810)
128         default "12"    if (CPU_CK860)
129
130 config L1_CACHE_SHIFT
131         int
132         default "4"     if (CPU_CK610)
133         default "5"     if (CPU_CK807 || CPU_CK810)
134         default "6"     if (CPU_CK860)
135
136 menu "Processor type and features"
137
138 choice
139         prompt "CPU MODEL"
140         default CPU_CK807
141
142 config CPU_CK610
143         bool "CSKY CPU ck610"
144         select CPU_NEED_TLBSYNC
145         select CPU_NEED_SOFTALIGN
146         select CPU_NO_USER_BKPT
147
148 config CPU_CK810
149         bool "CSKY CPU ck810"
150         select CPU_HAS_HILO
151         select CPU_NEED_TLBSYNC
152
153 config CPU_CK807
154         bool "CSKY CPU ck807"
155         select CPU_HAS_HILO
156
157 config CPU_CK860
158         bool "CSKY CPU ck860"
159         select CPU_HAS_TLBI
160         select CPU_HAS_CACHEV2
161         select CPU_HAS_LDSTEX
162         select CPU_HAS_FPUV2
163 endchoice
164
165 choice
166         prompt "C-SKY PMU type"
167         depends on PERF_EVENTS
168         depends on CPU_CK807 || CPU_CK810 || CPU_CK860
169
170 config CPU_PMU_NONE
171         bool "None"
172
173 config CSKY_PMU_V1
174         bool "Performance Monitoring Unit Ver.1"
175
176 endchoice
177
178 choice
179         prompt "Power Manager Instruction (wait/doze/stop)"
180         default CPU_PM_NONE
181
182 config CPU_PM_NONE
183         bool "None"
184
185 config CPU_PM_WAIT
186         bool "wait"
187
188 config CPU_PM_DOZE
189         bool "doze"
190
191 config CPU_PM_STOP
192         bool "stop"
193 endchoice
194
195 menuconfig HAVE_TCM
196         bool "Tightly-Coupled/Sram Memory"
197         select GENERIC_ALLOCATOR
198         help
199           The implementation are not only used by TCM (Tightly-Coupled Meory)
200           but also used by sram on SOC bus. It follow existed linux tcm
201           software interface, so that old tcm application codes could be
202           re-used directly.
203
204 if HAVE_TCM
205 config ITCM_RAM_BASE
206         hex "ITCM ram base"
207         default 0xffffffff
208
209 config ITCM_NR_PAGES
210         int "Page count of ITCM size: NR*4KB"
211         range 1 256
212         default 32
213
214 config HAVE_DTCM
215         bool "DTCM Support"
216
217 config DTCM_RAM_BASE
218         hex "DTCM ram base"
219         depends on HAVE_DTCM
220         default 0xffffffff
221
222 config DTCM_NR_PAGES
223         int "Page count of DTCM size: NR*4KB"
224         depends on HAVE_DTCM
225         range 1 256
226         default 32
227 endif
228
229 config CPU_HAS_VDSP
230         bool "CPU has VDSP coprocessor"
231         depends on CPU_HAS_FPU && CPU_HAS_FPUV2
232
233 config CPU_HAS_FPU
234         bool "CPU has FPU coprocessor"
235         depends on CPU_CK807 || CPU_CK810 || CPU_CK860
236
237 config CPU_HAS_ICACHE_INS
238         bool "CPU has Icache invalidate instructions"
239         depends on CPU_HAS_CACHEV2
240
241 config CPU_HAS_TEE
242         bool "CPU has Trusted Execution Environment"
243         depends on CPU_CK810
244
245 config SMP
246         bool "Symmetric Multi-Processing (SMP) support for C-SKY"
247         depends on CPU_CK860
248         default n
249
250 config NR_CPUS
251         int "Maximum number of CPUs (2-32)"
252         range 2 32
253         depends on SMP
254         default "2"
255
256 config HIGHMEM
257         bool "High Memory Support"
258         depends on !CPU_CK610
259         default y
260
261 config FORCE_MAX_ZONEORDER
262         int "Maximum zone order"
263         default "11"
264
265 config RAM_BASE
266         hex "DRAM start addr (the same with memory-section in dts)"
267         default 0x0
268
269 config HOTPLUG_CPU
270         bool "Support for hot-pluggable CPUs"
271         select GENERIC_IRQ_MIGRATION
272         depends on SMP
273         help
274           Say Y here to allow turning CPUs off and on. CPUs can be
275           controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
276
277           Say N if you want to disable CPU hotplug.
278 endmenu
279
280 source "arch/csky/Kconfig.platforms"
281
282 source "kernel/Kconfig.hz"