18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ciconfig CSKY 38c2ecf20Sopenharmony_ci def_bool y 48c2ecf20Sopenharmony_ci select ARCH_32BIT_OFF_T 58c2ecf20Sopenharmony_ci select ARCH_HAS_DMA_PREP_COHERENT 68c2ecf20Sopenharmony_ci select ARCH_HAS_GCOV_PROFILE_ALL 78c2ecf20Sopenharmony_ci select ARCH_HAS_SYNC_DMA_FOR_CPU 88c2ecf20Sopenharmony_ci select ARCH_HAS_SYNC_DMA_FOR_DEVICE 98c2ecf20Sopenharmony_ci select ARCH_USE_BUILTIN_BSWAP 108c2ecf20Sopenharmony_ci select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2 118c2ecf20Sopenharmony_ci select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 128c2ecf20Sopenharmony_ci select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 138c2ecf20Sopenharmony_ci select COMMON_CLK 148c2ecf20Sopenharmony_ci select CLKSRC_MMIO 158c2ecf20Sopenharmony_ci select CSKY_MPINTC if CPU_CK860 168c2ecf20Sopenharmony_ci select CSKY_MP_TIMER if CPU_CK860 178c2ecf20Sopenharmony_ci select CSKY_APB_INTC 188c2ecf20Sopenharmony_ci select DMA_DIRECT_REMAP 198c2ecf20Sopenharmony_ci select IRQ_DOMAIN 208c2ecf20Sopenharmony_ci select HANDLE_DOMAIN_IRQ 218c2ecf20Sopenharmony_ci select DW_APB_TIMER_OF 228c2ecf20Sopenharmony_ci select GENERIC_IOREMAP 238c2ecf20Sopenharmony_ci select GENERIC_LIB_ASHLDI3 248c2ecf20Sopenharmony_ci select GENERIC_LIB_ASHRDI3 258c2ecf20Sopenharmony_ci select GENERIC_LIB_LSHRDI3 268c2ecf20Sopenharmony_ci select GENERIC_LIB_MULDI3 278c2ecf20Sopenharmony_ci select GENERIC_LIB_CMPDI2 288c2ecf20Sopenharmony_ci select GENERIC_LIB_UCMPDI2 298c2ecf20Sopenharmony_ci select GENERIC_ALLOCATOR 308c2ecf20Sopenharmony_ci select GENERIC_ATOMIC64 318c2ecf20Sopenharmony_ci select GENERIC_CLOCKEVENTS 328c2ecf20Sopenharmony_ci select GENERIC_CPU_DEVICES 338c2ecf20Sopenharmony_ci select GENERIC_IRQ_CHIP 348c2ecf20Sopenharmony_ci select GENERIC_IRQ_PROBE 358c2ecf20Sopenharmony_ci select GENERIC_IRQ_SHOW 368c2ecf20Sopenharmony_ci select GENERIC_IRQ_MULTI_HANDLER 378c2ecf20Sopenharmony_ci select GENERIC_SCHED_CLOCK 388c2ecf20Sopenharmony_ci select GENERIC_SMP_IDLE_THREAD 398c2ecf20Sopenharmony_ci select GX6605S_TIMER if CPU_CK610 408c2ecf20Sopenharmony_ci select HAVE_ARCH_TRACEHOOK 418c2ecf20Sopenharmony_ci select HAVE_ARCH_AUDITSYSCALL 428c2ecf20Sopenharmony_ci select HAVE_ARCH_MMAP_RND_BITS 438c2ecf20Sopenharmony_ci select HAVE_ARCH_SECCOMP_FILTER 448c2ecf20Sopenharmony_ci select HAVE_CONTEXT_TRACKING 458c2ecf20Sopenharmony_ci select HAVE_VIRT_CPU_ACCOUNTING_GEN 468c2ecf20Sopenharmony_ci select HAVE_DEBUG_BUGVERBOSE 478c2ecf20Sopenharmony_ci select HAVE_DYNAMIC_FTRACE 488c2ecf20Sopenharmony_ci select HAVE_DYNAMIC_FTRACE_WITH_REGS 498c2ecf20Sopenharmony_ci select HAVE_FUNCTION_TRACER 508c2ecf20Sopenharmony_ci select HAVE_FUNCTION_GRAPH_TRACER 518c2ecf20Sopenharmony_ci select HAVE_FUNCTION_ERROR_INJECTION 528c2ecf20Sopenharmony_ci select HAVE_FTRACE_MCOUNT_RECORD 538c2ecf20Sopenharmony_ci select HAVE_KERNEL_GZIP 548c2ecf20Sopenharmony_ci select HAVE_KERNEL_LZO 558c2ecf20Sopenharmony_ci select HAVE_KERNEL_LZMA 568c2ecf20Sopenharmony_ci select HAVE_KPROBES if !CPU_CK610 578c2ecf20Sopenharmony_ci select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 588c2ecf20Sopenharmony_ci select HAVE_KRETPROBES if !CPU_CK610 598c2ecf20Sopenharmony_ci select HAVE_PERF_EVENTS 608c2ecf20Sopenharmony_ci select HAVE_PERF_REGS 618c2ecf20Sopenharmony_ci select HAVE_PERF_USER_STACK_DUMP 628c2ecf20Sopenharmony_ci select HAVE_DMA_CONTIGUOUS 638c2ecf20Sopenharmony_ci select HAVE_REGS_AND_STACK_ACCESS_API 648c2ecf20Sopenharmony_ci select HAVE_RSEQ 658c2ecf20Sopenharmony_ci select HAVE_STACKPROTECTOR 668c2ecf20Sopenharmony_ci select HAVE_SYSCALL_TRACEPOINTS 678c2ecf20Sopenharmony_ci select MAY_HAVE_SPARSE_IRQ 688c2ecf20Sopenharmony_ci select MODULES_USE_ELF_RELA if MODULES 698c2ecf20Sopenharmony_ci select OF 708c2ecf20Sopenharmony_ci select OF_EARLY_FLATTREE 718c2ecf20Sopenharmony_ci select PERF_USE_VMALLOC if CPU_CK610 728c2ecf20Sopenharmony_ci select RTC_LIB 738c2ecf20Sopenharmony_ci select TIMER_OF 748c2ecf20Sopenharmony_ci select USB_ARCH_HAS_EHCI 758c2ecf20Sopenharmony_ci select USB_ARCH_HAS_OHCI 768c2ecf20Sopenharmony_ci select GENERIC_PCI_IOMAP 778c2ecf20Sopenharmony_ci select HAVE_PCI 788c2ecf20Sopenharmony_ci select PCI_DOMAINS_GENERIC if PCI 798c2ecf20Sopenharmony_ci select PCI_SYSCALL if PCI 808c2ecf20Sopenharmony_ci select PCI_MSI if PCI 818c2ecf20Sopenharmony_ci select SET_FS 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ciconfig LOCKDEP_SUPPORT 848c2ecf20Sopenharmony_ci def_bool y 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ciconfig ARCH_SUPPORTS_UPROBES 878c2ecf20Sopenharmony_ci def_bool y if !CPU_CK610 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ciconfig CPU_HAS_CACHEV2 908c2ecf20Sopenharmony_ci bool 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ciconfig CPU_HAS_FPUV2 938c2ecf20Sopenharmony_ci bool 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ciconfig CPU_HAS_HILO 968c2ecf20Sopenharmony_ci bool 978c2ecf20Sopenharmony_ci 988c2ecf20Sopenharmony_ciconfig CPU_HAS_TLBI 998c2ecf20Sopenharmony_ci bool 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ciconfig CPU_HAS_LDSTEX 1028c2ecf20Sopenharmony_ci bool 1038c2ecf20Sopenharmony_ci help 1048c2ecf20Sopenharmony_ci For SMP, CPU needs "ldex&stex" instructions for atomic operations. 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ciconfig CPU_NEED_TLBSYNC 1078c2ecf20Sopenharmony_ci bool 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ciconfig CPU_NEED_SOFTALIGN 1108c2ecf20Sopenharmony_ci bool 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ciconfig CPU_NO_USER_BKPT 1138c2ecf20Sopenharmony_ci bool 1148c2ecf20Sopenharmony_ci help 1158c2ecf20Sopenharmony_ci For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because 1168c2ecf20Sopenharmony_ci abiv2 is 16/32bit instruction set and "trap 1" is 32bit. 1178c2ecf20Sopenharmony_ci So we need a 16bit instruction as user space bkpt, and it will cause an illegal 1188c2ecf20Sopenharmony_ci instruction exception. 1198c2ecf20Sopenharmony_ci In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ciconfig GENERIC_CALIBRATE_DELAY 1228c2ecf20Sopenharmony_ci def_bool y 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ciconfig GENERIC_CSUM 1258c2ecf20Sopenharmony_ci def_bool y 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ciconfig GENERIC_HWEIGHT 1288c2ecf20Sopenharmony_ci def_bool y 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ciconfig MMU 1318c2ecf20Sopenharmony_ci def_bool y 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ciconfig STACKTRACE_SUPPORT 1348c2ecf20Sopenharmony_ci def_bool y 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ciconfig TIME_LOW_RES 1378c2ecf20Sopenharmony_ci def_bool y 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciconfig TRACE_IRQFLAGS_SUPPORT 1408c2ecf20Sopenharmony_ci def_bool y 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ciconfig CPU_TLB_SIZE 1438c2ecf20Sopenharmony_ci int 1448c2ecf20Sopenharmony_ci default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 1458c2ecf20Sopenharmony_ci default "1024" if (CPU_CK860) 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciconfig CPU_ASID_BITS 1488c2ecf20Sopenharmony_ci int 1498c2ecf20Sopenharmony_ci default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) 1508c2ecf20Sopenharmony_ci default "12" if (CPU_CK860) 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ciconfig L1_CACHE_SHIFT 1538c2ecf20Sopenharmony_ci int 1548c2ecf20Sopenharmony_ci default "4" if (CPU_CK610) 1558c2ecf20Sopenharmony_ci default "5" if (CPU_CK807 || CPU_CK810) 1568c2ecf20Sopenharmony_ci default "6" if (CPU_CK860) 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MIN 1598c2ecf20Sopenharmony_ci default 8 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci# max bits determined by the following formula: 1628c2ecf20Sopenharmony_ci# VA_BITS - PAGE_SHIFT - 3 1638c2ecf20Sopenharmony_ciconfig ARCH_MMAP_RND_BITS_MAX 1648c2ecf20Sopenharmony_ci default 17 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_cimenu "Processor type and features" 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_cichoice 1698c2ecf20Sopenharmony_ci prompt "CPU MODEL" 1708c2ecf20Sopenharmony_ci default CPU_CK807 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ciconfig CPU_CK610 1738c2ecf20Sopenharmony_ci bool "CSKY CPU ck610" 1748c2ecf20Sopenharmony_ci select CPU_NEED_TLBSYNC 1758c2ecf20Sopenharmony_ci select CPU_NEED_SOFTALIGN 1768c2ecf20Sopenharmony_ci select CPU_NO_USER_BKPT 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ciconfig CPU_CK810 1798c2ecf20Sopenharmony_ci bool "CSKY CPU ck810" 1808c2ecf20Sopenharmony_ci select CPU_HAS_HILO 1818c2ecf20Sopenharmony_ci select CPU_NEED_TLBSYNC 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ciconfig CPU_CK807 1848c2ecf20Sopenharmony_ci bool "CSKY CPU ck807" 1858c2ecf20Sopenharmony_ci select CPU_HAS_HILO 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ciconfig CPU_CK860 1888c2ecf20Sopenharmony_ci bool "CSKY CPU ck860" 1898c2ecf20Sopenharmony_ci select CPU_HAS_TLBI 1908c2ecf20Sopenharmony_ci select CPU_HAS_CACHEV2 1918c2ecf20Sopenharmony_ci select CPU_HAS_LDSTEX 1928c2ecf20Sopenharmony_ci select CPU_HAS_FPUV2 1938c2ecf20Sopenharmony_ciendchoice 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_cichoice 1968c2ecf20Sopenharmony_ci prompt "C-SKY PMU type" 1978c2ecf20Sopenharmony_ci depends on PERF_EVENTS 1988c2ecf20Sopenharmony_ci depends on CPU_CK807 || CPU_CK810 || CPU_CK860 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ciconfig CPU_PMU_NONE 2018c2ecf20Sopenharmony_ci bool "None" 2028c2ecf20Sopenharmony_ci 2038c2ecf20Sopenharmony_ciconfig CSKY_PMU_V1 2048c2ecf20Sopenharmony_ci bool "Performance Monitoring Unit Ver.1" 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ciendchoice 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_cichoice 2098c2ecf20Sopenharmony_ci prompt "Power Manager Instruction (wait/doze/stop)" 2108c2ecf20Sopenharmony_ci default CPU_PM_NONE 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ciconfig CPU_PM_NONE 2138c2ecf20Sopenharmony_ci bool "None" 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_ciconfig CPU_PM_WAIT 2168c2ecf20Sopenharmony_ci bool "wait" 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ciconfig CPU_PM_DOZE 2198c2ecf20Sopenharmony_ci bool "doze" 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ciconfig CPU_PM_STOP 2228c2ecf20Sopenharmony_ci bool "stop" 2238c2ecf20Sopenharmony_ciendchoice 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_cimenuconfig HAVE_TCM 2268c2ecf20Sopenharmony_ci bool "Tightly-Coupled/Sram Memory" 2278c2ecf20Sopenharmony_ci select GENERIC_ALLOCATOR 2288c2ecf20Sopenharmony_ci help 2298c2ecf20Sopenharmony_ci The implementation are not only used by TCM (Tightly-Coupled Meory) 2308c2ecf20Sopenharmony_ci but also used by sram on SOC bus. It follow existed linux tcm 2318c2ecf20Sopenharmony_ci software interface, so that old tcm application codes could be 2328c2ecf20Sopenharmony_ci re-used directly. 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ciif HAVE_TCM 2358c2ecf20Sopenharmony_ciconfig ITCM_RAM_BASE 2368c2ecf20Sopenharmony_ci hex "ITCM ram base" 2378c2ecf20Sopenharmony_ci default 0xffffffff 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ciconfig ITCM_NR_PAGES 2408c2ecf20Sopenharmony_ci int "Page count of ITCM size: NR*4KB" 2418c2ecf20Sopenharmony_ci range 1 256 2428c2ecf20Sopenharmony_ci default 32 2438c2ecf20Sopenharmony_ci 2448c2ecf20Sopenharmony_ciconfig HAVE_DTCM 2458c2ecf20Sopenharmony_ci bool "DTCM Support" 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ciconfig DTCM_RAM_BASE 2488c2ecf20Sopenharmony_ci hex "DTCM ram base" 2498c2ecf20Sopenharmony_ci depends on HAVE_DTCM 2508c2ecf20Sopenharmony_ci default 0xffffffff 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ciconfig DTCM_NR_PAGES 2538c2ecf20Sopenharmony_ci int "Page count of DTCM size: NR*4KB" 2548c2ecf20Sopenharmony_ci depends on HAVE_DTCM 2558c2ecf20Sopenharmony_ci range 1 256 2568c2ecf20Sopenharmony_ci default 32 2578c2ecf20Sopenharmony_ciendif 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ciconfig CPU_HAS_VDSP 2608c2ecf20Sopenharmony_ci bool "CPU has VDSP coprocessor" 2618c2ecf20Sopenharmony_ci depends on CPU_HAS_FPU && CPU_HAS_FPUV2 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ciconfig CPU_HAS_FPU 2648c2ecf20Sopenharmony_ci bool "CPU has FPU coprocessor" 2658c2ecf20Sopenharmony_ci depends on CPU_CK807 || CPU_CK810 || CPU_CK860 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ciconfig CPU_HAS_ICACHE_INS 2688c2ecf20Sopenharmony_ci bool "CPU has Icache invalidate instructions" 2698c2ecf20Sopenharmony_ci depends on CPU_HAS_CACHEV2 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ciconfig CPU_HAS_TEE 2728c2ecf20Sopenharmony_ci bool "CPU has Trusted Execution Environment" 2738c2ecf20Sopenharmony_ci depends on CPU_CK810 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ciconfig SMP 2768c2ecf20Sopenharmony_ci bool "Symmetric Multi-Processing (SMP) support for C-SKY" 2778c2ecf20Sopenharmony_ci depends on CPU_CK860 2788c2ecf20Sopenharmony_ci default n 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ciconfig NR_CPUS 2818c2ecf20Sopenharmony_ci int "Maximum number of CPUs (2-32)" 2828c2ecf20Sopenharmony_ci range 2 32 2838c2ecf20Sopenharmony_ci depends on SMP 2848c2ecf20Sopenharmony_ci default "4" 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ciconfig HIGHMEM 2878c2ecf20Sopenharmony_ci bool "High Memory Support" 2888c2ecf20Sopenharmony_ci depends on !CPU_CK610 2898c2ecf20Sopenharmony_ci default y 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ciconfig FORCE_MAX_ZONEORDER 2928c2ecf20Sopenharmony_ci int "Maximum zone order" 2938c2ecf20Sopenharmony_ci default "11" 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ciconfig DRAM_BASE 2968c2ecf20Sopenharmony_ci hex "DRAM start addr (the same with memory-section in dts)" 2978c2ecf20Sopenharmony_ci default 0x0 2988c2ecf20Sopenharmony_ci 2998c2ecf20Sopenharmony_ciconfig HOTPLUG_CPU 3008c2ecf20Sopenharmony_ci bool "Support for hot-pluggable CPUs" 3018c2ecf20Sopenharmony_ci select GENERIC_IRQ_MIGRATION 3028c2ecf20Sopenharmony_ci depends on SMP 3038c2ecf20Sopenharmony_ci help 3048c2ecf20Sopenharmony_ci Say Y here to allow turning CPUs off and on. CPUs can be 3058c2ecf20Sopenharmony_ci controlled through /sys/devices/system/cpu/cpu1/hotplug/target. 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci Say N if you want to disable CPU hotplug. 3088c2ecf20Sopenharmony_ciendmenu 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_cisource "arch/csky/Kconfig.platforms" 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_cisource "kernel/Kconfig.hz" 313