Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# SPDX-License-Identifier: GPL-2.0-only
config CONFIG_CSKY
	def_bool y
	select CONFIG_ARCH_32BIT_OFF_T
	select CONFIG_ARCH_HAS_DMA_PREP_COHERENT
	select CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
	select CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE
	select CONFIG_ARCH_USE_BUILTIN_BSWAP
	select CONFIG_ARCH_USE_QUEUED_RWLOCKS if CONFIG_NR_CPUS>2
	select CONFIG_COMMON_CLK
	select CONFIG_CLKSRC_MMIO
	select CONFIG_CLKSRC_OF
	select CONFIG_CSKY_MPINTC if CONFIG_CPU_CK860
	select CONFIG_CSKY_MP_TIMER if CONFIG_CPU_CK860
	select CONFIG_CSKY_APB_INTC
	select CONFIG_DMA_DIRECT_REMAP
	select CONFIG_IRQ_DOMAIN
	select CONFIG_HANDLE_DOMAIN_IRQ
	select CONFIG_DW_APB_TIMER_OF
	select CONFIG_GENERIC_LIB_ASHLDI3
	select CONFIG_GENERIC_LIB_ASHRDI3
	select CONFIG_GENERIC_LIB_LSHRDI3
	select CONFIG_GENERIC_LIB_MULDI3
	select CONFIG_GENERIC_LIB_CMPDI2
	select CONFIG_GENERIC_LIB_UCMPDI2
	select CONFIG_GENERIC_ALLOCATOR
	select CONFIG_GENERIC_ATOMIC64
	select CONFIG_GENERIC_CLOCKEVENTS
	select CONFIG_GENERIC_CPU_DEVICES
	select CONFIG_GENERIC_IRQ_CHIP
	select CONFIG_GENERIC_IRQ_PROBE
	select CONFIG_GENERIC_IRQ_SHOW
	select CONFIG_GENERIC_IRQ_MULTI_HANDLER
	select CONFIG_GENERIC_SCHED_CLOCK
	select CONFIG_GENERIC_SMP_IDLE_THREAD
	select CONFIG_GX6605S_TIMER if CONFIG_CPU_CK610
	select CONFIG_HAVE_ARCH_TRACEHOOK
	select CONFIG_HAVE_ARCH_AUDITSYSCALL
	select CONFIG_HAVE_DYNAMIC_FTRACE
	select CONFIG_HAVE_FUNCTION_TRACER
	select CONFIG_HAVE_FUNCTION_GRAPH_TRACER
	select CONFIG_HAVE_FTRACE_MCOUNT_RECORD
	select CONFIG_HAVE_KERNEL_GZIP
	select CONFIG_HAVE_KERNEL_LZO
	select CONFIG_HAVE_KERNEL_LZMA
	select CONFIG_HAVE_PERF_EVENTS
	select CONFIG_HAVE_PERF_REGS
	select CONFIG_HAVE_PERF_USER_STACK_DUMP
	select CONFIG_HAVE_DMA_API_DEBUG
	select CONFIG_HAVE_DMA_CONTIGUOUS
	select CONFIG_HAVE_SYSCALL_TRACEPOINTS
	select CONFIG_MAY_HAVE_SPARSE_IRQ
	select CONFIG_MODULES_USE_ELF_RELA if CONFIG_MODULES
	select CONFIG_OF
	select CONFIG_OF_EARLY_FLATTREE
	select CONFIG_PERF_USE_VMALLOC if CONFIG_CPU_CK610
	select CONFIG_RTC_LIB
	select CONFIG_TIMER_OF
	select USB_ARCH_HAS_EHCI
	select USB_ARCH_HAS_OHCI

config CONFIG_CPU_HAS_CACHEV2
	bool

config CONFIG_CPU_HAS_FPUV2
	bool

config CONFIG_CPU_HAS_HILO
	bool

config CONFIG_CPU_HAS_TLBI
	bool

config CONFIG_CPU_HAS_LDSTEX
	bool
	help
	  For CONFIG_SMP, CPU needs "ldex&stex" instrcutions to atomic operations.

config CONFIG_CPU_NEED_TLBSYNC
	bool

config CONFIG_CPU_NEED_SOFTALIGN
	bool

config 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 CONFIG_GENERIC_CALIBRATE_DELAY
	def_bool y

config CONFIG_GENERIC_CSUM
	def_bool y

config CONFIG_GENERIC_HWEIGHT
	def_bool y

config CONFIG_MMU
	def_bool y

config CONFIG_STACKTRACE_SUPPORT
	def_bool y

config CONFIG_TIME_LOW_RES
	def_bool y

config CONFIG_TRACE_IRQFLAGS_SUPPORT
	def_bool y

config CONFIG_CPU_TLB_SIZE
	int
	default "128"	if (CONFIG_CPU_CK610 || CONFIG_CPU_CK807 || CONFIG_CPU_CK810)
	default "1024"	if (CONFIG_CPU_CK860)

config CONFIG_CPU_ASID_BITS
	int
	default "8"	if (CONFIG_CPU_CK610 || CONFIG_CPU_CK807 || CONFIG_CPU_CK810)
	default "12"	if (CONFIG_CPU_CK860)

config CONFIG_L1_CACHE_SHIFT
	int
	default "4"	if (CONFIG_CPU_CK610)
	default "5"	if (CONFIG_CPU_CK807 || CONFIG_CPU_CK810)
	default "6"	if (CONFIG_CPU_CK860)

menu "Processor type and features"

choice
	prompt "CPU MODEL"
	default CONFIG_CPU_CK807

config CONFIG_CPU_CK610
	bool "CSKY CPU ck610"
	select CONFIG_CPU_NEED_TLBSYNC
	select CONFIG_CPU_NEED_SOFTALIGN
	select CONFIG_CPU_NO_USER_BKPT

config CONFIG_CPU_CK810
	bool "CSKY CPU ck810"
	select CONFIG_CPU_HAS_HILO
	select CONFIG_CPU_NEED_TLBSYNC

config CONFIG_CPU_CK807
	bool "CSKY CPU ck807"
	select CONFIG_CPU_HAS_HILO

config CONFIG_CPU_CK860
	bool "CSKY CPU ck860"
	select CONFIG_CPU_HAS_TLBI
	select CONFIG_CPU_HAS_CACHEV2
	select CONFIG_CPU_HAS_LDSTEX
	select CONFIG_CPU_HAS_FPUV2
endchoice

choice
	prompt "C-SKY PMU type"
	depends on CONFIG_PERF_EVENTS
	depends on CONFIG_CPU_CK807 || CONFIG_CPU_CK810 || CONFIG_CPU_CK860

config CONFIG_CPU_PMU_NONE
	bool "None"

config CONFIG_CSKY_PMU_V1
	bool "Performance Monitoring Unit Ver.1"

endchoice

choice
	prompt "Power Manager Instruction (wait/doze/stop)"
	default CONFIG_CPU_PM_NONE

config CONFIG_CPU_PM_NONE
	bool "None"

config CONFIG_CPU_PM_WAIT
	bool "wait"

config CONFIG_CPU_PM_DOZE
	bool "doze"

config CONFIG_CPU_PM_STOP
	bool "stop"
endchoice

config CONFIG_CPU_HAS_VDSP
	bool "CPU has VDSP coprocessor"
	depends on CONFIG_CPU_HAS_FPU && CONFIG_CPU_HAS_FPUV2

config CONFIG_CPU_HAS_FPU
	bool "CPU has FPU coprocessor"
	depends on CONFIG_CPU_CK807 || CONFIG_CPU_CK810 || CONFIG_CPU_CK860

config CONFIG_CPU_HAS_TEE
	bool "CPU has Trusted Execution Environment"
	depends on CONFIG_CPU_CK810

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

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

config CONFIG_HIGHMEM
	bool "High Memory Support"
	depends on !CONFIG_CPU_CK610
	default y

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

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

config CONFIG_HOTPLUG_CPU
	bool "Support for hot-pluggable CPUs"
	select CONFIG_GENERIC_IRQ_MIGRATION
	depends on CONFIG_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.
endmenu

source "kernel/Kconfig.hz"