1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2c32e64e8SGuo Renconfig CSKY 3c32e64e8SGuo Ren def_bool y 4942fa985SYury Norov select ARCH_32BIT_OFF_T 513bf5cedSChristoph Hellwig select ARCH_HAS_DMA_PREP_COHERENT 6de863678SMa Jun select ARCH_HAS_GCOV_PROFILE_ALL 7c32e64e8SGuo Ren select ARCH_HAS_SYNC_DMA_FOR_CPU 8c32e64e8SGuo Ren select ARCH_HAS_SYNC_DMA_FOR_DEVICE 9c32e64e8SGuo Ren select ARCH_USE_BUILTIN_BSWAP 108e35ac73SGuo Ren select ARCH_USE_QUEUED_RWLOCKS 1145e15c1aSGuo Ren select ARCH_USE_QUEUED_SPINLOCKS 12b203c67eSTong Tiangen select ARCH_HAS_CURRENT_STACK_POINTER 137f8030ceSGuo Ren select ARCH_INLINE_READ_LOCK if !PREEMPTION 147f8030ceSGuo Ren select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION 157f8030ceSGuo Ren select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION 167f8030ceSGuo Ren select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION 177f8030ceSGuo Ren select ARCH_INLINE_READ_UNLOCK if !PREEMPTION 187f8030ceSGuo Ren select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION 197f8030ceSGuo Ren select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION 207f8030ceSGuo Ren select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION 217f8030ceSGuo Ren select ARCH_INLINE_WRITE_LOCK if !PREEMPTION 227f8030ceSGuo Ren select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION 237f8030ceSGuo Ren select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION 247f8030ceSGuo Ren select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION 257f8030ceSGuo Ren select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION 267f8030ceSGuo Ren select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION 277f8030ceSGuo Ren select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION 287f8030ceSGuo Ren select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION 297f8030ceSGuo Ren select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION 307f8030ceSGuo Ren select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION 317f8030ceSGuo Ren select ARCH_INLINE_SPIN_LOCK if !PREEMPTION 327f8030ceSGuo Ren select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION 337f8030ceSGuo Ren select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION 347f8030ceSGuo Ren select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION 357f8030ceSGuo Ren select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION 367f8030ceSGuo Ren select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION 377f8030ceSGuo Ren select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION 387f8030ceSGuo Ren select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION 39aeba0b84SGuenter Roeck select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace) 40953131e5SGuo Ren select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 41c32e64e8SGuo Ren select COMMON_CLK 42c32e64e8SGuo Ren select CLKSRC_MMIO 431994cc49SGuo Ren select CSKY_MPINTC if CPU_CK860 441994cc49SGuo Ren select CSKY_MP_TIMER if CPU_CK860 451994cc49SGuo Ren select CSKY_APB_INTC 46f04b951fSChristoph Hellwig select DMA_DIRECT_REMAP 47c32e64e8SGuo Ren select IRQ_DOMAIN 48c32e64e8SGuo Ren select DW_APB_TIMER_OF 490055f67bSChristoph Hellwig select GENERIC_IOREMAP 50c32e64e8SGuo Ren select GENERIC_LIB_ASHLDI3 51c32e64e8SGuo Ren select GENERIC_LIB_ASHRDI3 52c32e64e8SGuo Ren select GENERIC_LIB_LSHRDI3 53c32e64e8SGuo Ren select GENERIC_LIB_MULDI3 54c32e64e8SGuo Ren select GENERIC_LIB_CMPDI2 55c32e64e8SGuo Ren select GENERIC_LIB_UCMPDI2 56c32e64e8SGuo Ren select GENERIC_ALLOCATOR 57c32e64e8SGuo Ren select GENERIC_ATOMIC64 58c32e64e8SGuo Ren select GENERIC_CPU_DEVICES 59c32e64e8SGuo Ren select GENERIC_IRQ_CHIP 60c32e64e8SGuo Ren select GENERIC_IRQ_PROBE 61c32e64e8SGuo Ren select GENERIC_IRQ_SHOW 62c32e64e8SGuo Ren select GENERIC_IRQ_MULTI_HANDLER 63c32e64e8SGuo Ren select GENERIC_SCHED_CLOCK 64c32e64e8SGuo Ren select GENERIC_SMP_IDLE_THREAD 650d3b051aSGuo Ren select GENERIC_TIME_VSYSCALL 660d3b051aSGuo Ren select GENERIC_VDSO_32 670d3b051aSGuo Ren select GENERIC_GETTIMEOFDAY 681994cc49SGuo Ren select GX6605S_TIMER if CPU_CK610 69c32e64e8SGuo Ren select HAVE_ARCH_TRACEHOOK 702f7932b0SGuo Ren select HAVE_ARCH_AUDITSYSCALL 714e8bb4baSGuo Ren select HAVE_ARCH_JUMP_LABEL if !CPU_CK610 724e8bb4baSGuo Ren select HAVE_ARCH_JUMP_LABEL_RELATIVE 73953131e5SGuo Ren select HAVE_ARCH_MMAP_RND_BITS 74e95a4f8cSGuo Ren select HAVE_ARCH_SECCOMP_FILTER 7524a9c541SFrederic Weisbecker select HAVE_CONTEXT_TRACKING_USER 76bdcd93efSGuo Ren select HAVE_VIRT_CPU_ACCOUNTING_GEN 7718c07d23SGuo Ren select HAVE_DEBUG_BUGVERBOSE 78c109f424SGuo Ren select HAVE_DEBUG_KMEMLEAK 7928bb030fSGuo Ren select HAVE_DYNAMIC_FTRACE 8089a3927aSGuo Ren select HAVE_DYNAMIC_FTRACE_WITH_REGS 810d3b051aSGuo Ren select HAVE_GENERIC_VDSO 82230c77a5SGuo Ren select HAVE_FUNCTION_TRACER 83d7950be1SGuo Ren select HAVE_FUNCTION_GRAPH_TRACER 8471e193d7SGuo Ren select HAVE_FUNCTION_ERROR_INJECTION 8528bb030fSGuo Ren select HAVE_FTRACE_MCOUNT_RECORD 86c32e64e8SGuo Ren select HAVE_KERNEL_GZIP 87c32e64e8SGuo Ren select HAVE_KERNEL_LZO 88c32e64e8SGuo Ren select HAVE_KERNEL_LZMA 8933e53ae1SGuo Ren select HAVE_KPROBES if !CPU_CK610 9033e53ae1SGuo Ren select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 9133e53ae1SGuo Ren select HAVE_KRETPROBES if !CPU_CK610 92*5394f1e9SArnd Bergmann select HAVE_PAGE_SIZE_4KB 93f50fd2d8SGuo Ren select HAVE_PERF_EVENTS 94daac95e7SMao Han select HAVE_PERF_REGS 95daac95e7SMao Han select HAVE_PERF_USER_STACK_DUMP 96c32e64e8SGuo Ren select HAVE_DMA_CONTIGUOUS 97bfe47f35SGuo Ren select HAVE_REGS_AND_STACK_ACCESS_API 982f78c73fSMao Han select HAVE_STACKPROTECTOR 992f7932b0SGuo Ren select HAVE_SYSCALL_TRACEPOINTS 1007202e979SThomas Gleixner select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 101a050ba1eSLinus Torvalds select LOCK_MM_AND_FIND_VMA 102c32e64e8SGuo Ren select MAY_HAVE_SPARSE_IRQ 103c32e64e8SGuo Ren select MODULES_USE_ELF_RELA if MODULES 104c32e64e8SGuo Ren select OF 105c32e64e8SGuo Ren select OF_EARLY_FLATTREE 106f50fd2d8SGuo Ren select PERF_USE_VMALLOC if CPU_CK610 107c32e64e8SGuo Ren select RTC_LIB 108c32e64e8SGuo Ren select TIMER_OF 1095b49c82dSMaJun select GENERIC_PCI_IOMAP 1105b49c82dSMaJun select HAVE_PCI 1115b49c82dSMaJun select PCI_DOMAINS_GENERIC if PCI 1125b49c82dSMaJun select PCI_SYSCALL if PCI 1135b49c82dSMaJun select PCI_MSI if PCI 1144aae683fSMasahiro Yamada select TRACE_IRQFLAGS_SUPPORT 115c32e64e8SGuo Ren 116000591f1SGuo Renconfig LOCKDEP_SUPPORT 117000591f1SGuo Ren def_bool y 118000591f1SGuo Ren 1198f6bb793SGuo Renconfig ARCH_SUPPORTS_UPROBES 1208f6bb793SGuo Ren def_bool y if !CPU_CK610 1218f6bb793SGuo Ren 122c32e64e8SGuo Renconfig CPU_HAS_CACHEV2 123c32e64e8SGuo Ren bool 124c32e64e8SGuo Ren 125c32e64e8SGuo Renconfig CPU_HAS_FPUV2 126c32e64e8SGuo Ren bool 127c32e64e8SGuo Ren 128c32e64e8SGuo Renconfig CPU_HAS_HILO 129c32e64e8SGuo Ren bool 130c32e64e8SGuo Ren 131c32e64e8SGuo Renconfig CPU_HAS_TLBI 132c32e64e8SGuo Ren bool 133c32e64e8SGuo Ren 134c32e64e8SGuo Renconfig CPU_HAS_LDSTEX 135c32e64e8SGuo Ren bool 136c32e64e8SGuo Ren help 137bebd26abSRandy Dunlap For SMP, CPU needs "ldex&stex" instructions for atomic operations. 138c32e64e8SGuo Ren 139c32e64e8SGuo Renconfig CPU_NEED_TLBSYNC 140c32e64e8SGuo Ren bool 141c32e64e8SGuo Ren 142c32e64e8SGuo Renconfig CPU_NEED_SOFTALIGN 143c32e64e8SGuo Ren bool 144c32e64e8SGuo Ren 145c32e64e8SGuo Renconfig CPU_NO_USER_BKPT 146c32e64e8SGuo Ren bool 147c32e64e8SGuo Ren help 148c32e64e8SGuo Ren For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because 149c32e64e8SGuo Ren abiv2 is 16/32bit instruction set and "trap 1" is 32bit. 150c32e64e8SGuo Ren So we need a 16bit instruction as user space bkpt, and it will cause an illegal 151c32e64e8SGuo Ren instruction exception. 152c32e64e8SGuo Ren In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. 153c32e64e8SGuo Ren 154c32e64e8SGuo Renconfig GENERIC_CALIBRATE_DELAY 155c32e64e8SGuo Ren def_bool y 156c32e64e8SGuo Ren 157c32e64e8SGuo Renconfig GENERIC_CSUM 158c32e64e8SGuo Ren def_bool y 159c32e64e8SGuo Ren 160c32e64e8SGuo Renconfig GENERIC_HWEIGHT 161c32e64e8SGuo Ren def_bool y 162c32e64e8SGuo Ren 163c32e64e8SGuo Renconfig MMU 164c32e64e8SGuo Ren def_bool y 165c32e64e8SGuo Ren 1660ea2dc7cSGuo Renconfig STACKTRACE_SUPPORT 1670ea2dc7cSGuo Ren def_bool y 1680ea2dc7cSGuo Ren 169c32e64e8SGuo Renconfig TIME_LOW_RES 170c32e64e8SGuo Ren def_bool y 171c32e64e8SGuo Ren 172c32e64e8SGuo Renconfig CPU_ASID_BITS 173c32e64e8SGuo Ren int 174c32e64e8SGuo Ren default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 175c32e64e8SGuo Ren default "12" if (CPU_CK860) 176c32e64e8SGuo Ren 177c32e64e8SGuo Renconfig L1_CACHE_SHIFT 178c32e64e8SGuo Ren int 179c32e64e8SGuo Ren default "4" if (CPU_CK610) 180c32e64e8SGuo Ren default "5" if (CPU_CK807 || CPU_CK810) 181c32e64e8SGuo Ren default "6" if (CPU_CK860) 182c32e64e8SGuo Ren 183953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MIN 184953131e5SGuo Ren default 8 185953131e5SGuo Ren 186953131e5SGuo Ren# max bits determined by the following formula: 187953131e5SGuo Ren# VA_BITS - PAGE_SHIFT - 3 188953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MAX 189953131e5SGuo Ren default 17 190953131e5SGuo Ren 191c32e64e8SGuo Renmenu "Processor type and features" 192c32e64e8SGuo Ren 193c32e64e8SGuo Renchoice 194c32e64e8SGuo Ren prompt "CPU MODEL" 195c32e64e8SGuo Ren default CPU_CK807 196c32e64e8SGuo Ren 197c32e64e8SGuo Renconfig CPU_CK610 198c32e64e8SGuo Ren bool "CSKY CPU ck610" 199c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 200c32e64e8SGuo Ren select CPU_NEED_SOFTALIGN 201c32e64e8SGuo Ren select CPU_NO_USER_BKPT 202c32e64e8SGuo Ren 203c32e64e8SGuo Renconfig CPU_CK810 204c32e64e8SGuo Ren bool "CSKY CPU ck810" 205c32e64e8SGuo Ren select CPU_HAS_HILO 206c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 207c32e64e8SGuo Ren 208c32e64e8SGuo Renconfig CPU_CK807 209c32e64e8SGuo Ren bool "CSKY CPU ck807" 210c32e64e8SGuo Ren select CPU_HAS_HILO 211c32e64e8SGuo Ren 212c32e64e8SGuo Renconfig CPU_CK860 213c32e64e8SGuo Ren bool "CSKY CPU ck860" 214c32e64e8SGuo Ren select CPU_HAS_TLBI 215c32e64e8SGuo Ren select CPU_HAS_CACHEV2 216c32e64e8SGuo Ren select CPU_HAS_LDSTEX 217c32e64e8SGuo Ren select CPU_HAS_FPUV2 218c32e64e8SGuo Renendchoice 219c32e64e8SGuo Ren 220c32e64e8SGuo Renchoice 2210c8a32eeSGuo Ren prompt "PAGE OFFSET" 2220c8a32eeSGuo Ren default PAGE_OFFSET_80000000 2230c8a32eeSGuo Ren 2240c8a32eeSGuo Renconfig PAGE_OFFSET_80000000 2250c8a32eeSGuo Ren bool "PAGE OFFSET 2G (user:kernel = 2:2)" 2260c8a32eeSGuo Ren 2270c8a32eeSGuo Renconfig PAGE_OFFSET_A0000000 2280c8a32eeSGuo Ren bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)" 2290c8a32eeSGuo Renendchoice 2300c8a32eeSGuo Ren 2310c8a32eeSGuo Renconfig PAGE_OFFSET 2320c8a32eeSGuo Ren hex 2330c8a32eeSGuo Ren default 0x80000000 if PAGE_OFFSET_80000000 2340c8a32eeSGuo Ren default 0xa0000000 if PAGE_OFFSET_A0000000 2350c8a32eeSGuo Renchoice 2360c8a32eeSGuo Ren 237f50fd2d8SGuo Ren prompt "C-SKY PMU type" 238f50fd2d8SGuo Ren depends on PERF_EVENTS 239f50fd2d8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 240f50fd2d8SGuo Ren 241f50fd2d8SGuo Renconfig CPU_PMU_NONE 242f50fd2d8SGuo Ren bool "None" 243f50fd2d8SGuo Ren 244f50fd2d8SGuo Renconfig CSKY_PMU_V1 245f50fd2d8SGuo Ren bool "Performance Monitoring Unit Ver.1" 246f50fd2d8SGuo Ren 247f50fd2d8SGuo Renendchoice 248f50fd2d8SGuo Ren 249f50fd2d8SGuo Renchoice 250c32e64e8SGuo Ren prompt "Power Manager Instruction (wait/doze/stop)" 251c32e64e8SGuo Ren default CPU_PM_NONE 252c32e64e8SGuo Ren 253c32e64e8SGuo Renconfig CPU_PM_NONE 254c32e64e8SGuo Ren bool "None" 255c32e64e8SGuo Ren 256c32e64e8SGuo Renconfig CPU_PM_WAIT 257c32e64e8SGuo Ren bool "wait" 258c32e64e8SGuo Ren 259c32e64e8SGuo Renconfig CPU_PM_DOZE 260c32e64e8SGuo Ren bool "doze" 261c32e64e8SGuo Ren 262c32e64e8SGuo Renconfig CPU_PM_STOP 263c32e64e8SGuo Ren bool "stop" 264c32e64e8SGuo Renendchoice 265c32e64e8SGuo Ren 266f525bb2cSGuo Renmenuconfig HAVE_TCM 267f525bb2cSGuo Ren bool "Tightly-Coupled/Sram Memory" 268e21e52adSGuenter Roeck depends on !COMPILE_TEST 269f525bb2cSGuo Ren help 270ce0ba954SColin Ian King The implementation are not only used by TCM (Tightly-Coupled Memory) 271f525bb2cSGuo Ren but also used by sram on SOC bus. It follow existed linux tcm 272f525bb2cSGuo Ren software interface, so that old tcm application codes could be 273f525bb2cSGuo Ren re-used directly. 274f525bb2cSGuo Ren 275f525bb2cSGuo Renif HAVE_TCM 276f525bb2cSGuo Renconfig ITCM_RAM_BASE 277f525bb2cSGuo Ren hex "ITCM ram base" 278f525bb2cSGuo Ren default 0xffffffff 279f525bb2cSGuo Ren 280f525bb2cSGuo Renconfig ITCM_NR_PAGES 281f525bb2cSGuo Ren int "Page count of ITCM size: NR*4KB" 282f525bb2cSGuo Ren range 1 256 283f525bb2cSGuo Ren default 32 284f525bb2cSGuo Ren 285f525bb2cSGuo Renconfig HAVE_DTCM 286f525bb2cSGuo Ren bool "DTCM Support" 287f525bb2cSGuo Ren 288f525bb2cSGuo Renconfig DTCM_RAM_BASE 289f525bb2cSGuo Ren hex "DTCM ram base" 290f525bb2cSGuo Ren depends on HAVE_DTCM 291f525bb2cSGuo Ren default 0xffffffff 292f525bb2cSGuo Ren 293f525bb2cSGuo Renconfig DTCM_NR_PAGES 294f525bb2cSGuo Ren int "Page count of DTCM size: NR*4KB" 295f525bb2cSGuo Ren depends on HAVE_DTCM 296f525bb2cSGuo Ren range 1 256 297f525bb2cSGuo Ren default 32 298f525bb2cSGuo Renendif 299f525bb2cSGuo Ren 300c32e64e8SGuo Renconfig CPU_HAS_VDSP 301c32e64e8SGuo Ren bool "CPU has VDSP coprocessor" 302c32e64e8SGuo Ren depends on CPU_HAS_FPU && CPU_HAS_FPUV2 303c32e64e8SGuo Ren 304c32e64e8SGuo Renconfig CPU_HAS_FPU 305c32e64e8SGuo Ren bool "CPU has FPU coprocessor" 306c32e64e8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 307c32e64e8SGuo Ren 308761b4f69SGuo Renconfig CPU_HAS_ICACHE_INS 309761b4f69SGuo Ren bool "CPU has Icache invalidate instructions" 310761b4f69SGuo Ren depends on CPU_HAS_CACHEV2 311761b4f69SGuo Ren 312c32e64e8SGuo Renconfig CPU_HAS_TEE 313c32e64e8SGuo Ren bool "CPU has Trusted Execution Environment" 314c32e64e8SGuo Ren depends on CPU_CK810 315c32e64e8SGuo Ren 316c32e64e8SGuo Renconfig SMP 317c32e64e8SGuo Ren bool "Symmetric Multi-Processing (SMP) support for C-SKY" 318c32e64e8SGuo Ren depends on CPU_CK860 319c32e64e8SGuo Ren default n 320c32e64e8SGuo Ren 321c32e64e8SGuo Renconfig NR_CPUS 322c32e64e8SGuo Ren int "Maximum number of CPUs (2-32)" 323c32e64e8SGuo Ren range 2 32 324c32e64e8SGuo Ren depends on SMP 32550d23a1cSGuo Ren default "4" 326c32e64e8SGuo Ren 327c32e64e8SGuo Renconfig HIGHMEM 328c32e64e8SGuo Ren bool "High Memory Support" 329c32e64e8SGuo Ren depends on !CPU_CK610 3305af627a0SThomas Gleixner select KMAP_LOCAL 331c32e64e8SGuo Ren default y 332c32e64e8SGuo Ren 333d1991616SRandy Dunlapconfig DRAM_BASE 334c32e64e8SGuo Ren hex "DRAM start addr (the same with memory-section in dts)" 335c32e64e8SGuo Ren default 0x0 336c32e64e8SGuo Ren 337859e5f45SGuo Renconfig HOTPLUG_CPU 338859e5f45SGuo Ren bool "Support for hot-pluggable CPUs" 339859e5f45SGuo Ren select GENERIC_IRQ_MIGRATION 340859e5f45SGuo Ren depends on SMP 341859e5f45SGuo Ren help 342859e5f45SGuo Ren Say Y here to allow turning CPUs off and on. CPUs can be 343859e5f45SGuo Ren controlled through /sys/devices/system/cpu/cpu1/hotplug/target. 344859e5f45SGuo Ren 345859e5f45SGuo Ren Say N if you want to disable CPU hotplug. 346e4df2d5eSMatteo Croce 347e4df2d5eSMatteo Croceconfig HAVE_EFFICIENT_UNALIGNED_STRING_OPS 348e4df2d5eSMatteo Croce bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2" 349e4df2d5eSMatteo Croce depends on CPU_CK807 || CPU_CK810 || CPU_CK860 350e4df2d5eSMatteo Croce help 351e4df2d5eSMatteo Croce Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could 352e4df2d5eSMatteo Croce deal with unaligned access by hardware. 353e4df2d5eSMatteo Croce 354c32e64e8SGuo Renendmenu 355c32e64e8SGuo Ren 356a736fa1eSGuo Rensource "arch/csky/Kconfig.platforms" 357a736fa1eSGuo Ren 358c32e64e8SGuo Rensource "kernel/Kconfig.hz" 359