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