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 11aeba0b84SGuenter Roeck select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace) 12953131e5SGuo Ren select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 13c32e64e8SGuo Ren select COMMON_CLK 14c32e64e8SGuo Ren select CLKSRC_MMIO 151994cc49SGuo Ren select CSKY_MPINTC if CPU_CK860 161994cc49SGuo Ren select CSKY_MP_TIMER if CPU_CK860 171994cc49SGuo Ren select CSKY_APB_INTC 18f04b951fSChristoph Hellwig select DMA_DIRECT_REMAP 19c32e64e8SGuo Ren select IRQ_DOMAIN 20c32e64e8SGuo Ren select DW_APB_TIMER_OF 210055f67bSChristoph Hellwig select GENERIC_IOREMAP 22c32e64e8SGuo Ren select GENERIC_LIB_ASHLDI3 23c32e64e8SGuo Ren select GENERIC_LIB_ASHRDI3 24c32e64e8SGuo Ren select GENERIC_LIB_LSHRDI3 25c32e64e8SGuo Ren select GENERIC_LIB_MULDI3 26c32e64e8SGuo Ren select GENERIC_LIB_CMPDI2 27c32e64e8SGuo Ren select GENERIC_LIB_UCMPDI2 28c32e64e8SGuo Ren select GENERIC_ALLOCATOR 29c32e64e8SGuo Ren select GENERIC_ATOMIC64 30c32e64e8SGuo Ren select GENERIC_CPU_DEVICES 31c32e64e8SGuo Ren select GENERIC_IRQ_CHIP 32c32e64e8SGuo Ren select GENERIC_IRQ_PROBE 33c32e64e8SGuo Ren select GENERIC_IRQ_SHOW 34c32e64e8SGuo Ren select GENERIC_IRQ_MULTI_HANDLER 35c32e64e8SGuo Ren select GENERIC_SCHED_CLOCK 36c32e64e8SGuo Ren select GENERIC_SMP_IDLE_THREAD 370d3b051aSGuo Ren select GENERIC_TIME_VSYSCALL 380d3b051aSGuo Ren select GENERIC_VDSO_32 390d3b051aSGuo Ren select GENERIC_GETTIMEOFDAY 401994cc49SGuo Ren select GX6605S_TIMER if CPU_CK610 41c32e64e8SGuo Ren select HAVE_ARCH_TRACEHOOK 422f7932b0SGuo Ren select HAVE_ARCH_AUDITSYSCALL 43*4e8bb4baSGuo Ren select HAVE_ARCH_JUMP_LABEL if !CPU_CK610 44*4e8bb4baSGuo Ren select HAVE_ARCH_JUMP_LABEL_RELATIVE 45953131e5SGuo Ren select HAVE_ARCH_MMAP_RND_BITS 46e95a4f8cSGuo Ren select HAVE_ARCH_SECCOMP_FILTER 47bdcd93efSGuo Ren select HAVE_CONTEXT_TRACKING 48bdcd93efSGuo Ren select HAVE_VIRT_CPU_ACCOUNTING_GEN 4918c07d23SGuo Ren select HAVE_DEBUG_BUGVERBOSE 50c109f424SGuo Ren select HAVE_DEBUG_KMEMLEAK 5128bb030fSGuo Ren select HAVE_DYNAMIC_FTRACE 5289a3927aSGuo Ren select HAVE_DYNAMIC_FTRACE_WITH_REGS 530d3b051aSGuo Ren select HAVE_GENERIC_VDSO 54230c77a5SGuo Ren select HAVE_FUNCTION_TRACER 55d7950be1SGuo Ren select HAVE_FUNCTION_GRAPH_TRACER 5671e193d7SGuo Ren select HAVE_FUNCTION_ERROR_INJECTION 5728bb030fSGuo Ren select HAVE_FTRACE_MCOUNT_RECORD 58c32e64e8SGuo Ren select HAVE_KERNEL_GZIP 59c32e64e8SGuo Ren select HAVE_KERNEL_LZO 60c32e64e8SGuo Ren select HAVE_KERNEL_LZMA 6133e53ae1SGuo Ren select HAVE_KPROBES if !CPU_CK610 6233e53ae1SGuo Ren select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 6333e53ae1SGuo Ren select HAVE_KRETPROBES if !CPU_CK610 64f50fd2d8SGuo Ren select HAVE_PERF_EVENTS 65daac95e7SMao Han select HAVE_PERF_REGS 66daac95e7SMao Han select HAVE_PERF_USER_STACK_DUMP 67c32e64e8SGuo Ren select HAVE_DMA_CONTIGUOUS 68bfe47f35SGuo Ren select HAVE_REGS_AND_STACK_ACCESS_API 699866d141SGuo Ren select HAVE_RSEQ 702f78c73fSMao Han select HAVE_STACKPROTECTOR 712f7932b0SGuo Ren select HAVE_SYSCALL_TRACEPOINTS 72c32e64e8SGuo Ren select MAY_HAVE_SPARSE_IRQ 73c32e64e8SGuo Ren select MODULES_USE_ELF_RELA if MODULES 74c32e64e8SGuo Ren select OF 75c32e64e8SGuo Ren select OF_EARLY_FLATTREE 76f50fd2d8SGuo Ren select PERF_USE_VMALLOC if CPU_CK610 77c32e64e8SGuo Ren select RTC_LIB 78c32e64e8SGuo Ren select TIMER_OF 795b49c82dSMaJun select GENERIC_PCI_IOMAP 805b49c82dSMaJun select HAVE_PCI 815b49c82dSMaJun select PCI_DOMAINS_GENERIC if PCI 825b49c82dSMaJun select PCI_SYSCALL if PCI 835b49c82dSMaJun select PCI_MSI if PCI 844aae683fSMasahiro Yamada select TRACE_IRQFLAGS_SUPPORT 85c32e64e8SGuo Ren 86000591f1SGuo Renconfig LOCKDEP_SUPPORT 87000591f1SGuo Ren def_bool y 88000591f1SGuo Ren 898f6bb793SGuo Renconfig ARCH_SUPPORTS_UPROBES 908f6bb793SGuo Ren def_bool y if !CPU_CK610 918f6bb793SGuo Ren 92c32e64e8SGuo Renconfig CPU_HAS_CACHEV2 93c32e64e8SGuo Ren bool 94c32e64e8SGuo Ren 95c32e64e8SGuo Renconfig CPU_HAS_FPUV2 96c32e64e8SGuo Ren bool 97c32e64e8SGuo Ren 98c32e64e8SGuo Renconfig CPU_HAS_HILO 99c32e64e8SGuo Ren bool 100c32e64e8SGuo Ren 101c32e64e8SGuo Renconfig CPU_HAS_TLBI 102c32e64e8SGuo Ren bool 103c32e64e8SGuo Ren 104c32e64e8SGuo Renconfig CPU_HAS_LDSTEX 105c32e64e8SGuo Ren bool 106c32e64e8SGuo Ren help 107bebd26abSRandy Dunlap For SMP, CPU needs "ldex&stex" instructions for atomic operations. 108c32e64e8SGuo Ren 109c32e64e8SGuo Renconfig CPU_NEED_TLBSYNC 110c32e64e8SGuo Ren bool 111c32e64e8SGuo Ren 112c32e64e8SGuo Renconfig CPU_NEED_SOFTALIGN 113c32e64e8SGuo Ren bool 114c32e64e8SGuo Ren 115c32e64e8SGuo Renconfig CPU_NO_USER_BKPT 116c32e64e8SGuo Ren bool 117c32e64e8SGuo Ren help 118c32e64e8SGuo Ren For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because 119c32e64e8SGuo Ren abiv2 is 16/32bit instruction set and "trap 1" is 32bit. 120c32e64e8SGuo Ren So we need a 16bit instruction as user space bkpt, and it will cause an illegal 121c32e64e8SGuo Ren instruction exception. 122c32e64e8SGuo Ren In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. 123c32e64e8SGuo Ren 124c32e64e8SGuo Renconfig GENERIC_CALIBRATE_DELAY 125c32e64e8SGuo Ren def_bool y 126c32e64e8SGuo Ren 127c32e64e8SGuo Renconfig GENERIC_CSUM 128c32e64e8SGuo Ren def_bool y 129c32e64e8SGuo Ren 130c32e64e8SGuo Renconfig GENERIC_HWEIGHT 131c32e64e8SGuo Ren def_bool y 132c32e64e8SGuo Ren 133c32e64e8SGuo Renconfig MMU 134c32e64e8SGuo Ren def_bool y 135c32e64e8SGuo Ren 1360ea2dc7cSGuo Renconfig STACKTRACE_SUPPORT 1370ea2dc7cSGuo Ren def_bool y 1380ea2dc7cSGuo Ren 139c32e64e8SGuo Renconfig TIME_LOW_RES 140c32e64e8SGuo Ren def_bool y 141c32e64e8SGuo Ren 142c32e64e8SGuo Renconfig CPU_TLB_SIZE 143c32e64e8SGuo Ren int 144c32e64e8SGuo Ren default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 145c32e64e8SGuo Ren default "1024" if (CPU_CK860) 146c32e64e8SGuo Ren 147c32e64e8SGuo Renconfig CPU_ASID_BITS 148c32e64e8SGuo Ren int 149c32e64e8SGuo Ren default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 150c32e64e8SGuo Ren default "12" if (CPU_CK860) 151c32e64e8SGuo Ren 152c32e64e8SGuo Renconfig L1_CACHE_SHIFT 153c32e64e8SGuo Ren int 154c32e64e8SGuo Ren default "4" if (CPU_CK610) 155c32e64e8SGuo Ren default "5" if (CPU_CK807 || CPU_CK810) 156c32e64e8SGuo Ren default "6" if (CPU_CK860) 157c32e64e8SGuo Ren 158953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MIN 159953131e5SGuo Ren default 8 160953131e5SGuo Ren 161953131e5SGuo Ren# max bits determined by the following formula: 162953131e5SGuo Ren# VA_BITS - PAGE_SHIFT - 3 163953131e5SGuo Renconfig ARCH_MMAP_RND_BITS_MAX 164953131e5SGuo Ren default 17 165953131e5SGuo Ren 166c32e64e8SGuo Renmenu "Processor type and features" 167c32e64e8SGuo Ren 168c32e64e8SGuo Renchoice 169c32e64e8SGuo Ren prompt "CPU MODEL" 170c32e64e8SGuo Ren default CPU_CK807 171c32e64e8SGuo Ren 172c32e64e8SGuo Renconfig CPU_CK610 173c32e64e8SGuo Ren bool "CSKY CPU ck610" 174c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 175c32e64e8SGuo Ren select CPU_NEED_SOFTALIGN 176c32e64e8SGuo Ren select CPU_NO_USER_BKPT 177c32e64e8SGuo Ren 178c32e64e8SGuo Renconfig CPU_CK810 179c32e64e8SGuo Ren bool "CSKY CPU ck810" 180c32e64e8SGuo Ren select CPU_HAS_HILO 181c32e64e8SGuo Ren select CPU_NEED_TLBSYNC 182c32e64e8SGuo Ren 183c32e64e8SGuo Renconfig CPU_CK807 184c32e64e8SGuo Ren bool "CSKY CPU ck807" 185c32e64e8SGuo Ren select CPU_HAS_HILO 186c32e64e8SGuo Ren 187c32e64e8SGuo Renconfig CPU_CK860 188c32e64e8SGuo Ren bool "CSKY CPU ck860" 189c32e64e8SGuo Ren select CPU_HAS_TLBI 190c32e64e8SGuo Ren select CPU_HAS_CACHEV2 191c32e64e8SGuo Ren select CPU_HAS_LDSTEX 192c32e64e8SGuo Ren select CPU_HAS_FPUV2 193c32e64e8SGuo Renendchoice 194c32e64e8SGuo Ren 195c32e64e8SGuo Renchoice 1960c8a32eeSGuo Ren prompt "PAGE OFFSET" 1970c8a32eeSGuo Ren default PAGE_OFFSET_80000000 1980c8a32eeSGuo Ren 1990c8a32eeSGuo Renconfig PAGE_OFFSET_80000000 2000c8a32eeSGuo Ren bool "PAGE OFFSET 2G (user:kernel = 2:2)" 2010c8a32eeSGuo Ren 2020c8a32eeSGuo Renconfig PAGE_OFFSET_A0000000 2030c8a32eeSGuo Ren bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)" 2040c8a32eeSGuo Renendchoice 2050c8a32eeSGuo Ren 2060c8a32eeSGuo Renconfig PAGE_OFFSET 2070c8a32eeSGuo Ren hex 2080c8a32eeSGuo Ren default 0x80000000 if PAGE_OFFSET_80000000 2090c8a32eeSGuo Ren default 0xa0000000 if PAGE_OFFSET_A0000000 2100c8a32eeSGuo Renchoice 2110c8a32eeSGuo Ren 212f50fd2d8SGuo Ren prompt "C-SKY PMU type" 213f50fd2d8SGuo Ren depends on PERF_EVENTS 214f50fd2d8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 215f50fd2d8SGuo Ren 216f50fd2d8SGuo Renconfig CPU_PMU_NONE 217f50fd2d8SGuo Ren bool "None" 218f50fd2d8SGuo Ren 219f50fd2d8SGuo Renconfig CSKY_PMU_V1 220f50fd2d8SGuo Ren bool "Performance Monitoring Unit Ver.1" 221f50fd2d8SGuo Ren 222f50fd2d8SGuo Renendchoice 223f50fd2d8SGuo Ren 224f50fd2d8SGuo Renchoice 225c32e64e8SGuo Ren prompt "Power Manager Instruction (wait/doze/stop)" 226c32e64e8SGuo Ren default CPU_PM_NONE 227c32e64e8SGuo Ren 228c32e64e8SGuo Renconfig CPU_PM_NONE 229c32e64e8SGuo Ren bool "None" 230c32e64e8SGuo Ren 231c32e64e8SGuo Renconfig CPU_PM_WAIT 232c32e64e8SGuo Ren bool "wait" 233c32e64e8SGuo Ren 234c32e64e8SGuo Renconfig CPU_PM_DOZE 235c32e64e8SGuo Ren bool "doze" 236c32e64e8SGuo Ren 237c32e64e8SGuo Renconfig CPU_PM_STOP 238c32e64e8SGuo Ren bool "stop" 239c32e64e8SGuo Renendchoice 240c32e64e8SGuo Ren 241f525bb2cSGuo Renmenuconfig HAVE_TCM 242f525bb2cSGuo Ren bool "Tightly-Coupled/Sram Memory" 243e21e52adSGuenter Roeck depends on !COMPILE_TEST 244f525bb2cSGuo Ren help 245f525bb2cSGuo Ren The implementation are not only used by TCM (Tightly-Coupled Meory) 246f525bb2cSGuo Ren but also used by sram on SOC bus. It follow existed linux tcm 247f525bb2cSGuo Ren software interface, so that old tcm application codes could be 248f525bb2cSGuo Ren re-used directly. 249f525bb2cSGuo Ren 250f525bb2cSGuo Renif HAVE_TCM 251f525bb2cSGuo Renconfig ITCM_RAM_BASE 252f525bb2cSGuo Ren hex "ITCM ram base" 253f525bb2cSGuo Ren default 0xffffffff 254f525bb2cSGuo Ren 255f525bb2cSGuo Renconfig ITCM_NR_PAGES 256f525bb2cSGuo Ren int "Page count of ITCM size: NR*4KB" 257f525bb2cSGuo Ren range 1 256 258f525bb2cSGuo Ren default 32 259f525bb2cSGuo Ren 260f525bb2cSGuo Renconfig HAVE_DTCM 261f525bb2cSGuo Ren bool "DTCM Support" 262f525bb2cSGuo Ren 263f525bb2cSGuo Renconfig DTCM_RAM_BASE 264f525bb2cSGuo Ren hex "DTCM ram base" 265f525bb2cSGuo Ren depends on HAVE_DTCM 266f525bb2cSGuo Ren default 0xffffffff 267f525bb2cSGuo Ren 268f525bb2cSGuo Renconfig DTCM_NR_PAGES 269f525bb2cSGuo Ren int "Page count of DTCM size: NR*4KB" 270f525bb2cSGuo Ren depends on HAVE_DTCM 271f525bb2cSGuo Ren range 1 256 272f525bb2cSGuo Ren default 32 273f525bb2cSGuo Renendif 274f525bb2cSGuo Ren 275c32e64e8SGuo Renconfig CPU_HAS_VDSP 276c32e64e8SGuo Ren bool "CPU has VDSP coprocessor" 277c32e64e8SGuo Ren depends on CPU_HAS_FPU && CPU_HAS_FPUV2 278c32e64e8SGuo Ren 279c32e64e8SGuo Renconfig CPU_HAS_FPU 280c32e64e8SGuo Ren bool "CPU has FPU coprocessor" 281c32e64e8SGuo Ren depends on CPU_CK807 || CPU_CK810 || CPU_CK860 282c32e64e8SGuo Ren 283761b4f69SGuo Renconfig CPU_HAS_ICACHE_INS 284761b4f69SGuo Ren bool "CPU has Icache invalidate instructions" 285761b4f69SGuo Ren depends on CPU_HAS_CACHEV2 286761b4f69SGuo Ren 287c32e64e8SGuo Renconfig CPU_HAS_TEE 288c32e64e8SGuo Ren bool "CPU has Trusted Execution Environment" 289c32e64e8SGuo Ren depends on CPU_CK810 290c32e64e8SGuo Ren 291c32e64e8SGuo Renconfig SMP 292c32e64e8SGuo Ren bool "Symmetric Multi-Processing (SMP) support for C-SKY" 293c32e64e8SGuo Ren depends on CPU_CK860 294c32e64e8SGuo Ren default n 295c32e64e8SGuo Ren 296c32e64e8SGuo Renconfig NR_CPUS 297c32e64e8SGuo Ren int "Maximum number of CPUs (2-32)" 298c32e64e8SGuo Ren range 2 32 299c32e64e8SGuo Ren depends on SMP 30050d23a1cSGuo Ren default "4" 301c32e64e8SGuo Ren 302c32e64e8SGuo Renconfig HIGHMEM 303c32e64e8SGuo Ren bool "High Memory Support" 304c32e64e8SGuo Ren depends on !CPU_CK610 3055af627a0SThomas Gleixner select KMAP_LOCAL 306c32e64e8SGuo Ren default y 307c32e64e8SGuo Ren 308c32e64e8SGuo Renconfig FORCE_MAX_ZONEORDER 309c32e64e8SGuo Ren int "Maximum zone order" 310c32e64e8SGuo Ren default "11" 311c32e64e8SGuo Ren 312d1991616SRandy Dunlapconfig DRAM_BASE 313c32e64e8SGuo Ren hex "DRAM start addr (the same with memory-section in dts)" 314c32e64e8SGuo Ren default 0x0 315c32e64e8SGuo Ren 316859e5f45SGuo Renconfig HOTPLUG_CPU 317859e5f45SGuo Ren bool "Support for hot-pluggable CPUs" 318859e5f45SGuo Ren select GENERIC_IRQ_MIGRATION 319859e5f45SGuo Ren depends on SMP 320859e5f45SGuo Ren help 321859e5f45SGuo Ren Say Y here to allow turning CPUs off and on. CPUs can be 322859e5f45SGuo Ren controlled through /sys/devices/system/cpu/cpu1/hotplug/target. 323859e5f45SGuo Ren 324859e5f45SGuo Ren Say N if you want to disable CPU hotplug. 325e4df2d5eSMatteo Croce 326e4df2d5eSMatteo Croceconfig HAVE_EFFICIENT_UNALIGNED_STRING_OPS 327e4df2d5eSMatteo Croce bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2" 328e4df2d5eSMatteo Croce depends on CPU_CK807 || CPU_CK810 || CPU_CK860 329e4df2d5eSMatteo Croce help 330e4df2d5eSMatteo Croce Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could 331e4df2d5eSMatteo Croce deal with unaligned access by hardware. 332e4df2d5eSMatteo Croce 333c32e64e8SGuo Renendmenu 334c32e64e8SGuo Ren 335a736fa1eSGuo Rensource "arch/csky/Kconfig.platforms" 336a736fa1eSGuo Ren 337c32e64e8SGuo Rensource "kernel/Kconfig.hz" 338