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