Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 2 | config CSKY |
| 3 | def_bool y |
Yury Norov | 942fa98 | 2018-05-16 11:18:49 +0300 | [diff] [blame] | 4 | select ARCH_32BIT_OFF_T |
Christoph Hellwig | 13bf5ce | 2019-03-25 15:44:06 +0100 | [diff] [blame] | 5 | select ARCH_HAS_DMA_PREP_COHERENT |
Ma Jun | de86367 | 2020-03-10 23:32:56 +0800 | [diff] [blame] | 6 | select ARCH_HAS_GCOV_PROFILE_ALL |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 7 | select ARCH_HAS_SYNC_DMA_FOR_CPU |
| 8 | select ARCH_HAS_SYNC_DMA_FOR_DEVICE |
| 9 | select ARCH_USE_BUILTIN_BSWAP |
| 10 | select ARCH_USE_QUEUED_RWLOCKS if NR_CPUS>2 |
| 11 | select COMMON_CLK |
| 12 | select CLKSRC_MMIO |
Guo Ren | 1994cc4 | 2019-05-10 12:57:27 +0800 | [diff] [blame] | 13 | select CSKY_MPINTC if CPU_CK860 |
| 14 | select CSKY_MP_TIMER if CPU_CK860 |
| 15 | select CSKY_APB_INTC |
Christoph Hellwig | f04b951 | 2018-11-04 17:47:44 +0100 | [diff] [blame] | 16 | select DMA_DIRECT_REMAP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 17 | select IRQ_DOMAIN |
| 18 | select HANDLE_DOMAIN_IRQ |
| 19 | select DW_APB_TIMER_OF |
Christoph Hellwig | 0055f67 | 2019-08-13 11:41:57 +0200 | [diff] [blame] | 20 | select GENERIC_IOREMAP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 21 | select GENERIC_LIB_ASHLDI3 |
| 22 | select GENERIC_LIB_ASHRDI3 |
| 23 | select GENERIC_LIB_LSHRDI3 |
| 24 | select GENERIC_LIB_MULDI3 |
| 25 | select GENERIC_LIB_CMPDI2 |
| 26 | select GENERIC_LIB_UCMPDI2 |
| 27 | select GENERIC_ALLOCATOR |
| 28 | select GENERIC_ATOMIC64 |
| 29 | select GENERIC_CLOCKEVENTS |
| 30 | select GENERIC_CPU_DEVICES |
| 31 | select GENERIC_IRQ_CHIP |
| 32 | select GENERIC_IRQ_PROBE |
| 33 | select GENERIC_IRQ_SHOW |
| 34 | select GENERIC_IRQ_MULTI_HANDLER |
| 35 | select GENERIC_SCHED_CLOCK |
| 36 | select GENERIC_SMP_IDLE_THREAD |
Guo Ren | 1994cc4 | 2019-05-10 12:57:27 +0800 | [diff] [blame] | 37 | select GX6605S_TIMER if CPU_CK610 |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 38 | select HAVE_ARCH_TRACEHOOK |
Guo Ren | 2f7932b | 2019-03-20 18:27:27 +0800 | [diff] [blame] | 39 | select HAVE_ARCH_AUDITSYSCALL |
Guo Ren | 0b9f386 | 2020-02-12 10:24:52 +0800 | [diff] [blame] | 40 | select HAVE_COPY_THREAD_TLS |
Guo Ren | 28bb030 | 2019-03-01 08:50:36 +0800 | [diff] [blame] | 41 | select HAVE_DYNAMIC_FTRACE |
Guo Ren | 89a3927 | 2020-02-18 20:27:39 +0800 | [diff] [blame] | 42 | select HAVE_DYNAMIC_FTRACE_WITH_REGS |
Guo Ren | 230c77a | 2018-12-09 14:29:59 +0800 | [diff] [blame] | 43 | select HAVE_FUNCTION_TRACER |
Guo Ren | d7950be | 2018-12-15 21:04:27 +0800 | [diff] [blame] | 44 | select HAVE_FUNCTION_GRAPH_TRACER |
Guo Ren | 28bb030 | 2019-03-01 08:50:36 +0800 | [diff] [blame] | 45 | select HAVE_FTRACE_MCOUNT_RECORD |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 46 | select HAVE_KERNEL_GZIP |
| 47 | select HAVE_KERNEL_LZO |
| 48 | select HAVE_KERNEL_LZMA |
Guo Ren | 33e53ae | 2020-04-01 09:17:02 +0800 | [diff] [blame] | 49 | select HAVE_KPROBES if !CPU_CK610 |
| 50 | select HAVE_KPROBES_ON_FTRACE if !CPU_CK610 |
| 51 | select HAVE_KRETPROBES if !CPU_CK610 |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 52 | select HAVE_PERF_EVENTS |
Mao Han | daac95e | 2019-04-15 17:17:29 +0800 | [diff] [blame] | 53 | select HAVE_PERF_REGS |
| 54 | select HAVE_PERF_USER_STACK_DUMP |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 55 | select HAVE_DMA_CONTIGUOUS |
Guo Ren | bfe47f3 | 2019-12-17 14:57:22 +0800 | [diff] [blame] | 56 | select HAVE_REGS_AND_STACK_ACCESS_API |
Guo Ren | 9866d14 | 2019-11-05 09:58:33 +0800 | [diff] [blame] | 57 | select HAVE_RSEQ |
Mao Han | 2f78c73 | 2019-10-11 10:56:55 +0800 | [diff] [blame] | 58 | select HAVE_STACKPROTECTOR |
Guo Ren | 2f7932b | 2019-03-20 18:27:27 +0800 | [diff] [blame] | 59 | select HAVE_SYSCALL_TRACEPOINTS |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 60 | select MAY_HAVE_SPARSE_IRQ |
| 61 | select MODULES_USE_ELF_RELA if MODULES |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 62 | select OF |
| 63 | select OF_EARLY_FLATTREE |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 64 | select PERF_USE_VMALLOC if CPU_CK610 |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 65 | select RTC_LIB |
| 66 | select TIMER_OF |
| 67 | select USB_ARCH_HAS_EHCI |
| 68 | select USB_ARCH_HAS_OHCI |
MaJun | 5b49c82 | 2020-01-27 10:56:21 +0800 | [diff] [blame] | 69 | select GENERIC_PCI_IOMAP |
| 70 | select HAVE_PCI |
| 71 | select PCI_DOMAINS_GENERIC if PCI |
| 72 | select PCI_SYSCALL if PCI |
| 73 | select PCI_MSI if PCI |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 74 | |
Guo Ren | 000591f | 2020-04-02 19:39:42 +0800 | [diff] [blame] | 75 | config LOCKDEP_SUPPORT |
| 76 | def_bool y |
| 77 | |
Guo Ren | 8f6bb79 | 2020-04-02 19:52:27 +0800 | [diff] [blame^] | 78 | config ARCH_SUPPORTS_UPROBES |
| 79 | def_bool y if !CPU_CK610 |
| 80 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 81 | config CPU_HAS_CACHEV2 |
| 82 | bool |
| 83 | |
| 84 | config CPU_HAS_FPUV2 |
| 85 | bool |
| 86 | |
| 87 | config CPU_HAS_HILO |
| 88 | bool |
| 89 | |
| 90 | config CPU_HAS_TLBI |
| 91 | bool |
| 92 | |
| 93 | config CPU_HAS_LDSTEX |
| 94 | bool |
| 95 | help |
Randy Dunlap | bebd26a | 2020-01-31 17:52:30 -0800 | [diff] [blame] | 96 | For SMP, CPU needs "ldex&stex" instructions for atomic operations. |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 97 | |
| 98 | config CPU_NEED_TLBSYNC |
| 99 | bool |
| 100 | |
| 101 | config CPU_NEED_SOFTALIGN |
| 102 | bool |
| 103 | |
| 104 | config CPU_NO_USER_BKPT |
| 105 | bool |
| 106 | help |
| 107 | For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because |
| 108 | abiv2 is 16/32bit instruction set and "trap 1" is 32bit. |
| 109 | So we need a 16bit instruction as user space bkpt, and it will cause an illegal |
| 110 | instruction exception. |
| 111 | In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not. |
| 112 | |
| 113 | config GENERIC_CALIBRATE_DELAY |
| 114 | def_bool y |
| 115 | |
| 116 | config GENERIC_CSUM |
| 117 | def_bool y |
| 118 | |
| 119 | config GENERIC_HWEIGHT |
| 120 | def_bool y |
| 121 | |
| 122 | config MMU |
| 123 | def_bool y |
| 124 | |
Guo Ren | 0ea2dc7 | 2018-12-09 14:18:05 +0800 | [diff] [blame] | 125 | config STACKTRACE_SUPPORT |
| 126 | def_bool y |
| 127 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 128 | config TIME_LOW_RES |
| 129 | def_bool y |
| 130 | |
| 131 | config TRACE_IRQFLAGS_SUPPORT |
| 132 | def_bool y |
| 133 | |
| 134 | config CPU_TLB_SIZE |
| 135 | int |
| 136 | default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810) |
| 137 | default "1024" if (CPU_CK860) |
| 138 | |
| 139 | config CPU_ASID_BITS |
| 140 | int |
| 141 | default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810) |
| 142 | default "12" if (CPU_CK860) |
| 143 | |
| 144 | config L1_CACHE_SHIFT |
| 145 | int |
| 146 | default "4" if (CPU_CK610) |
| 147 | default "5" if (CPU_CK807 || CPU_CK810) |
| 148 | default "6" if (CPU_CK860) |
| 149 | |
| 150 | menu "Processor type and features" |
| 151 | |
| 152 | choice |
| 153 | prompt "CPU MODEL" |
| 154 | default CPU_CK807 |
| 155 | |
| 156 | config CPU_CK610 |
| 157 | bool "CSKY CPU ck610" |
| 158 | select CPU_NEED_TLBSYNC |
| 159 | select CPU_NEED_SOFTALIGN |
| 160 | select CPU_NO_USER_BKPT |
| 161 | |
| 162 | config CPU_CK810 |
| 163 | bool "CSKY CPU ck810" |
| 164 | select CPU_HAS_HILO |
| 165 | select CPU_NEED_TLBSYNC |
| 166 | |
| 167 | config CPU_CK807 |
| 168 | bool "CSKY CPU ck807" |
| 169 | select CPU_HAS_HILO |
| 170 | |
| 171 | config CPU_CK860 |
| 172 | bool "CSKY CPU ck860" |
| 173 | select CPU_HAS_TLBI |
| 174 | select CPU_HAS_CACHEV2 |
| 175 | select CPU_HAS_LDSTEX |
| 176 | select CPU_HAS_FPUV2 |
| 177 | endchoice |
| 178 | |
| 179 | choice |
Guo Ren | f50fd2d | 2019-01-02 22:09:25 +0800 | [diff] [blame] | 180 | prompt "C-SKY PMU type" |
| 181 | depends on PERF_EVENTS |
| 182 | depends on CPU_CK807 || CPU_CK810 || CPU_CK860 |
| 183 | |
| 184 | config CPU_PMU_NONE |
| 185 | bool "None" |
| 186 | |
| 187 | config CSKY_PMU_V1 |
| 188 | bool "Performance Monitoring Unit Ver.1" |
| 189 | |
| 190 | endchoice |
| 191 | |
| 192 | choice |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 193 | prompt "Power Manager Instruction (wait/doze/stop)" |
| 194 | default CPU_PM_NONE |
| 195 | |
| 196 | config CPU_PM_NONE |
| 197 | bool "None" |
| 198 | |
| 199 | config CPU_PM_WAIT |
| 200 | bool "wait" |
| 201 | |
| 202 | config CPU_PM_DOZE |
| 203 | bool "doze" |
| 204 | |
| 205 | config CPU_PM_STOP |
| 206 | bool "stop" |
| 207 | endchoice |
| 208 | |
Guo Ren | f525bb2 | 2019-11-27 08:44:33 +0800 | [diff] [blame] | 209 | menuconfig HAVE_TCM |
| 210 | bool "Tightly-Coupled/Sram Memory" |
Guo Ren | f525bb2 | 2019-11-27 08:44:33 +0800 | [diff] [blame] | 211 | select GENERIC_ALLOCATOR |
| 212 | help |
| 213 | The implementation are not only used by TCM (Tightly-Coupled Meory) |
| 214 | but also used by sram on SOC bus. It follow existed linux tcm |
| 215 | software interface, so that old tcm application codes could be |
| 216 | re-used directly. |
| 217 | |
| 218 | if HAVE_TCM |
| 219 | config ITCM_RAM_BASE |
| 220 | hex "ITCM ram base" |
| 221 | default 0xffffffff |
| 222 | |
| 223 | config ITCM_NR_PAGES |
| 224 | int "Page count of ITCM size: NR*4KB" |
| 225 | range 1 256 |
| 226 | default 32 |
| 227 | |
| 228 | config HAVE_DTCM |
| 229 | bool "DTCM Support" |
| 230 | |
| 231 | config DTCM_RAM_BASE |
| 232 | hex "DTCM ram base" |
| 233 | depends on HAVE_DTCM |
| 234 | default 0xffffffff |
| 235 | |
| 236 | config DTCM_NR_PAGES |
| 237 | int "Page count of DTCM size: NR*4KB" |
| 238 | depends on HAVE_DTCM |
| 239 | range 1 256 |
| 240 | default 32 |
| 241 | endif |
| 242 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 243 | config CPU_HAS_VDSP |
| 244 | bool "CPU has VDSP coprocessor" |
| 245 | depends on CPU_HAS_FPU && CPU_HAS_FPUV2 |
| 246 | |
| 247 | config CPU_HAS_FPU |
| 248 | bool "CPU has FPU coprocessor" |
| 249 | depends on CPU_CK807 || CPU_CK810 || CPU_CK860 |
| 250 | |
Guo Ren | 761b4f6 | 2020-01-22 11:15:14 +0800 | [diff] [blame] | 251 | config CPU_HAS_ICACHE_INS |
| 252 | bool "CPU has Icache invalidate instructions" |
| 253 | depends on CPU_HAS_CACHEV2 |
| 254 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 255 | config CPU_HAS_TEE |
| 256 | bool "CPU has Trusted Execution Environment" |
| 257 | depends on CPU_CK810 |
| 258 | |
| 259 | config SMP |
| 260 | bool "Symmetric Multi-Processing (SMP) support for C-SKY" |
| 261 | depends on CPU_CK860 |
| 262 | default n |
| 263 | |
| 264 | config NR_CPUS |
| 265 | int "Maximum number of CPUs (2-32)" |
| 266 | range 2 32 |
| 267 | depends on SMP |
| 268 | default "2" |
| 269 | |
| 270 | config HIGHMEM |
| 271 | bool "High Memory Support" |
| 272 | depends on !CPU_CK610 |
| 273 | default y |
| 274 | |
| 275 | config FORCE_MAX_ZONEORDER |
| 276 | int "Maximum zone order" |
| 277 | default "11" |
| 278 | |
| 279 | config RAM_BASE |
| 280 | hex "DRAM start addr (the same with memory-section in dts)" |
| 281 | default 0x0 |
| 282 | |
Guo Ren | 859e5f4 | 2018-12-19 19:56:14 +0800 | [diff] [blame] | 283 | config HOTPLUG_CPU |
| 284 | bool "Support for hot-pluggable CPUs" |
| 285 | select GENERIC_IRQ_MIGRATION |
| 286 | depends on SMP |
| 287 | help |
| 288 | Say Y here to allow turning CPUs off and on. CPUs can be |
| 289 | controlled through /sys/devices/system/cpu/cpu1/hotplug/target. |
| 290 | |
| 291 | Say N if you want to disable CPU hotplug. |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 292 | endmenu |
| 293 | |
Guo Ren | a736fa1 | 2020-01-11 13:44:32 +0800 | [diff] [blame] | 294 | source "arch/csky/Kconfig.platforms" |
| 295 | |
Guo Ren | c32e64e | 2018-09-05 14:25:06 +0800 | [diff] [blame] | 296 | source "kernel/Kconfig.hz" |