Kconfig 6.1 KB
Newer Older
1
# SPDX-License-Identifier: GPL-2.0-only
G
Guo Ren 已提交
2 3
config CSKY
	def_bool y
4
	select ARCH_32BIT_OFF_T
5
	select ARCH_HAS_DMA_PREP_COHERENT
M
Ma Jun 已提交
6
	select ARCH_HAS_GCOV_PROFILE_ALL
G
Guo Ren 已提交
7 8 9 10
	select ARCH_HAS_SYNC_DMA_FOR_CPU
	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2
G
Guo Ren 已提交
11
	select ARCH_WANT_FRAME_POINTERS if !CPU_CK610
G
Guo Ren 已提交
12 13
	select COMMON_CLK
	select CLKSRC_MMIO
G
Guo Ren 已提交
14 15 16
	select CSKY_MPINTC if CPU_CK860
	select CSKY_MP_TIMER if CPU_CK860
	select CSKY_APB_INTC
17
	select DMA_DIRECT_REMAP
G
Guo Ren 已提交
18 19 20
	select IRQ_DOMAIN
	select HANDLE_DOMAIN_IRQ
	select DW_APB_TIMER_OF
C
Christoph Hellwig 已提交
21
	select GENERIC_IOREMAP
G
Guo Ren 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
	select GENERIC_LIB_ASHLDI3
	select GENERIC_LIB_ASHRDI3
	select GENERIC_LIB_LSHRDI3
	select GENERIC_LIB_MULDI3
	select GENERIC_LIB_CMPDI2
	select GENERIC_LIB_UCMPDI2
	select GENERIC_ALLOCATOR
	select GENERIC_ATOMIC64
	select GENERIC_CLOCKEVENTS
	select GENERIC_CPU_DEVICES
	select GENERIC_IRQ_CHIP
	select GENERIC_IRQ_PROBE
	select GENERIC_IRQ_SHOW
	select GENERIC_IRQ_MULTI_HANDLER
	select GENERIC_SCHED_CLOCK
	select GENERIC_SMP_IDLE_THREAD
G
Guo Ren 已提交
38
	select GX6605S_TIMER if CPU_CK610
G
Guo Ren 已提交
39
	select HAVE_ARCH_TRACEHOOK
40
	select HAVE_ARCH_AUDITSYSCALL
G
Guo Ren 已提交
41
	select HAVE_COPY_THREAD_TLS
G
Guo Ren 已提交
42
	select HAVE_DEBUG_BUGVERBOSE
43
	select HAVE_DYNAMIC_FTRACE
G
Guo Ren 已提交
44
	select HAVE_DYNAMIC_FTRACE_WITH_REGS
G
Guo Ren 已提交
45
	select HAVE_FUNCTION_TRACER
G
Guo Ren 已提交
46
	select HAVE_FUNCTION_GRAPH_TRACER
47
	select HAVE_FTRACE_MCOUNT_RECORD
G
Guo Ren 已提交
48 49 50
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZO
	select HAVE_KERNEL_LZMA
G
Guo Ren 已提交
51 52 53
	select HAVE_KPROBES if !CPU_CK610
	select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
	select HAVE_KRETPROBES if !CPU_CK610
G
Guo Ren 已提交
54
	select HAVE_PERF_EVENTS
55 56
	select HAVE_PERF_REGS
	select HAVE_PERF_USER_STACK_DUMP
G
Guo Ren 已提交
57
	select HAVE_DMA_CONTIGUOUS
58
	select HAVE_REGS_AND_STACK_ACCESS_API
59
	select HAVE_RSEQ
M
Mao Han 已提交
60
	select HAVE_STACKPROTECTOR
61
	select HAVE_SYSCALL_TRACEPOINTS
G
Guo Ren 已提交
62 63 64 65
	select MAY_HAVE_SPARSE_IRQ
	select MODULES_USE_ELF_RELA if MODULES
	select OF
	select OF_EARLY_FLATTREE
G
Guo Ren 已提交
66
	select PERF_USE_VMALLOC if CPU_CK610
G
Guo Ren 已提交
67 68 69 70
	select RTC_LIB
	select TIMER_OF
	select USB_ARCH_HAS_EHCI
	select USB_ARCH_HAS_OHCI
M
MaJun 已提交
71 72 73 74 75
	select GENERIC_PCI_IOMAP
	select HAVE_PCI
	select PCI_DOMAINS_GENERIC if PCI
	select PCI_SYSCALL if PCI
	select PCI_MSI if PCI
G
Guo Ren 已提交
76

G
Guo Ren 已提交
77 78 79
config LOCKDEP_SUPPORT
	def_bool y

G
Guo Ren 已提交
80 81 82
config ARCH_SUPPORTS_UPROBES
	def_bool y if !CPU_CK610

G
Guo Ren 已提交
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
config CPU_HAS_CACHEV2
	bool

config CPU_HAS_FPUV2
	bool

config CPU_HAS_HILO
	bool

config CPU_HAS_TLBI
	bool

config CPU_HAS_LDSTEX
	bool
	help
R
Randy Dunlap 已提交
98
	  For SMP, CPU needs "ldex&stex" instructions for atomic operations.
G
Guo Ren 已提交
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

config CPU_NEED_TLBSYNC
	bool

config CPU_NEED_SOFTALIGN
	bool

config CPU_NO_USER_BKPT
	bool
	help
	  For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
	  abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
	  So we need a 16bit instruction as user space bkpt, and it will cause an illegal
	  instruction exception.
	  In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.

config GENERIC_CALIBRATE_DELAY
	def_bool y

config GENERIC_CSUM
	def_bool y

config GENERIC_HWEIGHT
	def_bool y

config MMU
	def_bool y

G
Guo Ren 已提交
127 128 129
config STACKTRACE_SUPPORT
	def_bool y

G
Guo Ren 已提交
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
config TIME_LOW_RES
	def_bool y

config TRACE_IRQFLAGS_SUPPORT
	def_bool y

config CPU_TLB_SIZE
	int
	default "128"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
	default "1024"	if (CPU_CK860)

config CPU_ASID_BITS
	int
	default "8"	if (CPU_CK610 || CPU_CK807 || CPU_CK810)
	default "12"	if (CPU_CK860)

config L1_CACHE_SHIFT
	int
	default "4"	if (CPU_CK610)
	default "5"	if (CPU_CK807 || CPU_CK810)
	default "6"	if (CPU_CK860)

menu "Processor type and features"

choice
	prompt "CPU MODEL"
	default CPU_CK807

config CPU_CK610
	bool "CSKY CPU ck610"
	select CPU_NEED_TLBSYNC
	select CPU_NEED_SOFTALIGN
	select CPU_NO_USER_BKPT

config CPU_CK810
	bool "CSKY CPU ck810"
	select CPU_HAS_HILO
	select CPU_NEED_TLBSYNC

config CPU_CK807
	bool "CSKY CPU ck807"
	select CPU_HAS_HILO

config CPU_CK860
	bool "CSKY CPU ck860"
	select CPU_HAS_TLBI
	select CPU_HAS_CACHEV2
	select CPU_HAS_LDSTEX
	select CPU_HAS_FPUV2
endchoice

G
Guo Ren 已提交
181 182 183 184 185 186 187 188 189 190 191 192 193
choice
	prompt "C-SKY PMU type"
	depends on PERF_EVENTS
	depends on CPU_CK807 || CPU_CK810 || CPU_CK860

config CPU_PMU_NONE
	bool "None"

config CSKY_PMU_V1
	bool "Performance Monitoring Unit Ver.1"

endchoice

G
Guo Ren 已提交
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
choice
	prompt "Power Manager Instruction (wait/doze/stop)"
	default CPU_PM_NONE

config CPU_PM_NONE
	bool "None"

config CPU_PM_WAIT
	bool "wait"

config CPU_PM_DOZE
	bool "doze"

config CPU_PM_STOP
	bool "stop"
endchoice

211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
menuconfig HAVE_TCM
	bool "Tightly-Coupled/Sram Memory"
	select GENERIC_ALLOCATOR
	help
	  The implementation are not only used by TCM (Tightly-Coupled Meory)
	  but also used by sram on SOC bus. It follow existed linux tcm
	  software interface, so that old tcm application codes could be
	  re-used directly.

if HAVE_TCM
config ITCM_RAM_BASE
	hex "ITCM ram base"
	default 0xffffffff

config ITCM_NR_PAGES
	int "Page count of ITCM size: NR*4KB"
	range 1 256
	default 32

config HAVE_DTCM
	bool "DTCM Support"

config DTCM_RAM_BASE
	hex "DTCM ram base"
	depends on HAVE_DTCM
	default 0xffffffff

config DTCM_NR_PAGES
	int "Page count of DTCM size: NR*4KB"
	depends on HAVE_DTCM
	range 1 256
	default 32
endif

G
Guo Ren 已提交
245 246 247 248 249 250 251 252
config CPU_HAS_VDSP
	bool "CPU has VDSP coprocessor"
	depends on CPU_HAS_FPU && CPU_HAS_FPUV2

config CPU_HAS_FPU
	bool "CPU has FPU coprocessor"
	depends on CPU_CK807 || CPU_CK810 || CPU_CK860

253 254 255 256
config CPU_HAS_ICACHE_INS
	bool "CPU has Icache invalidate instructions"
	depends on CPU_HAS_CACHEV2

G
Guo Ren 已提交
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
config CPU_HAS_TEE
	bool "CPU has Trusted Execution Environment"
	depends on CPU_CK810

config SMP
	bool "Symmetric Multi-Processing (SMP) support for C-SKY"
	depends on CPU_CK860
	default n

config NR_CPUS
	int "Maximum number of CPUs (2-32)"
	range 2 32
	depends on SMP
	default "2"

config HIGHMEM
	bool "High Memory Support"
	depends on !CPU_CK610
	default y

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	default "11"

config RAM_BASE
	hex "DRAM start addr (the same with memory-section in dts)"
	default 0x0

G
Guo Ren 已提交
285 286 287 288 289 290 291 292 293
config HOTPLUG_CPU
	bool "Support for hot-pluggable CPUs"
	select GENERIC_IRQ_MIGRATION
	depends on SMP
	help
	  Say Y here to allow turning CPUs off and on. CPUs can be
	  controlled through /sys/devices/system/cpu/cpu1/hotplug/target.

	  Say N if you want to disable CPU hotplug.
G
Guo Ren 已提交
294 295
endmenu

296 297
source "arch/csky/Kconfig.platforms"

G
Guo Ren 已提交
298
source "kernel/Kconfig.hz"