Kconfig 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config CSKY
  3. def_bool y
  4. select ARCH_32BIT_OFF_T
  5. select ARCH_HAS_CPU_CACHE_ALIASING
  6. select ARCH_HAS_DMA_PREP_COHERENT
  7. select ARCH_HAS_GCOV_PROFILE_ALL
  8. select ARCH_HAS_SYNC_DMA_FOR_CPU
  9. select ARCH_HAS_SYNC_DMA_FOR_DEVICE
  10. select ARCH_USE_BUILTIN_BSWAP
  11. select ARCH_USE_QUEUED_RWLOCKS
  12. select ARCH_USE_QUEUED_SPINLOCKS
  13. select ARCH_HAS_CURRENT_STACK_POINTER
  14. select ARCH_INLINE_READ_LOCK if !PREEMPTION
  15. select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
  16. select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
  17. select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION
  18. select ARCH_INLINE_READ_UNLOCK if !PREEMPTION
  19. select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION
  20. select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION
  21. select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION
  22. select ARCH_INLINE_WRITE_LOCK if !PREEMPTION
  23. select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION
  24. select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION
  25. select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION
  26. select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION
  27. select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION
  28. select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION
  29. select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION
  30. select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION
  31. select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION
  32. select ARCH_INLINE_SPIN_LOCK if !PREEMPTION
  33. select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION
  34. select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION
  35. select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION
  36. select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION
  37. select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
  38. select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
  39. select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
  40. select ARCH_NEED_CMPXCHG_1_EMU
  41. select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace)
  42. select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  43. select COMMON_CLK
  44. select CLKSRC_MMIO
  45. select CSKY_MPINTC if CPU_CK860
  46. select CSKY_MP_TIMER if CPU_CK860
  47. select CSKY_APB_INTC
  48. select DMA_DIRECT_REMAP
  49. select IRQ_DOMAIN
  50. select DW_APB_TIMER_OF
  51. select GENERIC_IOREMAP
  52. select GENERIC_LIB_ASHLDI3
  53. select GENERIC_LIB_ASHRDI3
  54. select GENERIC_LIB_LSHRDI3
  55. select GENERIC_LIB_MULDI3
  56. select GENERIC_LIB_CMPDI2
  57. select GENERIC_LIB_UCMPDI2
  58. select GENERIC_ALLOCATOR
  59. select GENERIC_ATOMIC64
  60. select GENERIC_CPU_DEVICES
  61. select GENERIC_IRQ_CHIP
  62. select GENERIC_IRQ_PROBE
  63. select GENERIC_IRQ_SHOW
  64. select GENERIC_IRQ_MULTI_HANDLER
  65. select GENERIC_SCHED_CLOCK
  66. select GENERIC_SMP_IDLE_THREAD
  67. select GENERIC_TIME_VSYSCALL
  68. select GENERIC_VDSO_32
  69. select GENERIC_GETTIMEOFDAY
  70. select GX6605S_TIMER if CPU_CK610
  71. select HAVE_ARCH_TRACEHOOK
  72. select HAVE_ARCH_AUDITSYSCALL
  73. select HAVE_ARCH_JUMP_LABEL if !CPU_CK610
  74. select HAVE_ARCH_JUMP_LABEL_RELATIVE
  75. select HAVE_ARCH_MMAP_RND_BITS
  76. select HAVE_ARCH_SECCOMP_FILTER
  77. select HAVE_CONTEXT_TRACKING_USER
  78. select HAVE_VIRT_CPU_ACCOUNTING_GEN
  79. select HAVE_DEBUG_BUGVERBOSE
  80. select HAVE_DEBUG_KMEMLEAK
  81. select HAVE_DYNAMIC_FTRACE
  82. select HAVE_DYNAMIC_FTRACE_WITH_REGS
  83. select HAVE_GENERIC_VDSO
  84. select HAVE_FUNCTION_TRACER
  85. select HAVE_FUNCTION_GRAPH_TRACER
  86. select HAVE_FUNCTION_ERROR_INJECTION
  87. select HAVE_FTRACE_MCOUNT_RECORD
  88. select HAVE_KERNEL_GZIP
  89. select HAVE_KERNEL_LZO
  90. select HAVE_KERNEL_LZMA
  91. select HAVE_KPROBES if !CPU_CK610
  92. select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
  93. select HAVE_KRETPROBES if !CPU_CK610
  94. select HAVE_PAGE_SIZE_4KB
  95. select HAVE_PERF_EVENTS
  96. select HAVE_PERF_REGS
  97. select HAVE_PERF_USER_STACK_DUMP
  98. select HAVE_DMA_CONTIGUOUS
  99. select HAVE_REGS_AND_STACK_ACCESS_API
  100. select HAVE_STACKPROTECTOR
  101. select HAVE_SYSCALL_TRACEPOINTS
  102. select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
  103. select LOCK_MM_AND_FIND_VMA
  104. select MAY_HAVE_SPARSE_IRQ
  105. select MODULES_USE_ELF_RELA if MODULES
  106. select OF
  107. select OF_EARLY_FLATTREE
  108. select PERF_USE_VMALLOC if CPU_CK610
  109. select RTC_LIB
  110. select TIMER_OF
  111. select GENERIC_PCI_IOMAP
  112. select HAVE_PCI
  113. select PCI_DOMAINS_GENERIC if PCI
  114. select PCI_SYSCALL if PCI
  115. select PCI_MSI if PCI
  116. select TRACE_IRQFLAGS_SUPPORT
  117. config LOCKDEP_SUPPORT
  118. def_bool y
  119. config ARCH_SUPPORTS_UPROBES
  120. def_bool y if !CPU_CK610
  121. config CPU_HAS_CACHEV2
  122. bool
  123. config CPU_HAS_FPUV2
  124. bool
  125. config CPU_HAS_HILO
  126. bool
  127. config CPU_HAS_TLBI
  128. bool
  129. config CPU_HAS_LDSTEX
  130. bool
  131. help
  132. For SMP, CPU needs "ldex&stex" instructions for atomic operations.
  133. config CPU_NEED_TLBSYNC
  134. bool
  135. config CPU_NEED_SOFTALIGN
  136. bool
  137. config CPU_NO_USER_BKPT
  138. bool
  139. help
  140. For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
  141. abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
  142. So we need a 16bit instruction as user space bkpt, and it will cause an illegal
  143. instruction exception.
  144. In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
  145. config GENERIC_CALIBRATE_DELAY
  146. def_bool y
  147. config GENERIC_CSUM
  148. def_bool y
  149. config GENERIC_HWEIGHT
  150. def_bool y
  151. config MMU
  152. def_bool y
  153. config STACKTRACE_SUPPORT
  154. def_bool y
  155. config TIME_LOW_RES
  156. def_bool y
  157. config CPU_ASID_BITS
  158. int
  159. default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
  160. default "12" if (CPU_CK860)
  161. config L1_CACHE_SHIFT
  162. int
  163. default "4" if (CPU_CK610)
  164. default "5" if (CPU_CK807 || CPU_CK810)
  165. default "6" if (CPU_CK860)
  166. config ARCH_MMAP_RND_BITS_MIN
  167. default 8
  168. # max bits determined by the following formula:
  169. # VA_BITS - PAGE_SHIFT - 3
  170. config ARCH_MMAP_RND_BITS_MAX
  171. default 17
  172. menu "Processor type and features"
  173. choice
  174. prompt "CPU MODEL"
  175. default CPU_CK807
  176. config CPU_CK610
  177. bool "CSKY CPU ck610"
  178. select CPU_NEED_TLBSYNC
  179. select CPU_NEED_SOFTALIGN
  180. select CPU_NO_USER_BKPT
  181. config CPU_CK810
  182. bool "CSKY CPU ck810"
  183. select CPU_HAS_HILO
  184. select CPU_NEED_TLBSYNC
  185. config CPU_CK807
  186. bool "CSKY CPU ck807"
  187. select CPU_HAS_HILO
  188. config CPU_CK860
  189. bool "CSKY CPU ck860"
  190. select CPU_HAS_TLBI
  191. select CPU_HAS_CACHEV2
  192. select CPU_HAS_LDSTEX
  193. select CPU_HAS_FPUV2
  194. endchoice
  195. choice
  196. prompt "PAGE OFFSET"
  197. default PAGE_OFFSET_80000000
  198. config PAGE_OFFSET_80000000
  199. bool "PAGE OFFSET 2G (user:kernel = 2:2)"
  200. config PAGE_OFFSET_A0000000
  201. bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)"
  202. endchoice
  203. config PAGE_OFFSET
  204. hex
  205. default 0x80000000 if PAGE_OFFSET_80000000
  206. default 0xa0000000 if PAGE_OFFSET_A0000000
  207. choice
  208. prompt "C-SKY PMU type"
  209. depends on PERF_EVENTS
  210. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  211. config CPU_PMU_NONE
  212. bool "None"
  213. config CSKY_PMU_V1
  214. bool "Performance Monitoring Unit Ver.1"
  215. endchoice
  216. choice
  217. prompt "Power Manager Instruction (wait/doze/stop)"
  218. default CPU_PM_NONE
  219. config CPU_PM_NONE
  220. bool "None"
  221. config CPU_PM_WAIT
  222. bool "wait"
  223. config CPU_PM_DOZE
  224. bool "doze"
  225. config CPU_PM_STOP
  226. bool "stop"
  227. endchoice
  228. menuconfig HAVE_TCM
  229. bool "Tightly-Coupled/Sram Memory"
  230. depends on !COMPILE_TEST
  231. help
  232. The implementation are not only used by TCM (Tightly-Coupled Memory)
  233. but also used by sram on SOC bus. It follow existed linux tcm
  234. software interface, so that old tcm application codes could be
  235. re-used directly.
  236. if HAVE_TCM
  237. config ITCM_RAM_BASE
  238. hex "ITCM ram base"
  239. default 0xffffffff
  240. config ITCM_NR_PAGES
  241. int "Page count of ITCM size: NR*4KB"
  242. range 1 256
  243. default 32
  244. config HAVE_DTCM
  245. bool "DTCM Support"
  246. config DTCM_RAM_BASE
  247. hex "DTCM ram base"
  248. depends on HAVE_DTCM
  249. default 0xffffffff
  250. config DTCM_NR_PAGES
  251. int "Page count of DTCM size: NR*4KB"
  252. depends on HAVE_DTCM
  253. range 1 256
  254. default 32
  255. endif
  256. config CPU_HAS_VDSP
  257. bool "CPU has VDSP coprocessor"
  258. depends on CPU_HAS_FPU && CPU_HAS_FPUV2
  259. config CPU_HAS_FPU
  260. bool "CPU has FPU coprocessor"
  261. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  262. config CPU_HAS_ICACHE_INS
  263. bool "CPU has Icache invalidate instructions"
  264. depends on CPU_HAS_CACHEV2
  265. config CPU_HAS_TEE
  266. bool "CPU has Trusted Execution Environment"
  267. depends on CPU_CK810
  268. config SMP
  269. bool "Symmetric Multi-Processing (SMP) support for C-SKY"
  270. depends on CPU_CK860
  271. default n
  272. config NR_CPUS
  273. int "Maximum number of CPUs (2-32)"
  274. range 2 32
  275. depends on SMP
  276. default "4"
  277. config HIGHMEM
  278. bool "High Memory Support"
  279. depends on !CPU_CK610
  280. select KMAP_LOCAL
  281. default y
  282. config DRAM_BASE
  283. hex "DRAM start addr (the same with memory-section in dts)"
  284. default 0x0
  285. config HOTPLUG_CPU
  286. bool "Support for hot-pluggable CPUs"
  287. select GENERIC_IRQ_MIGRATION
  288. depends on SMP
  289. help
  290. Say Y here to allow turning CPUs off and on. CPUs can be
  291. controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
  292. Say N if you want to disable CPU hotplug.
  293. config HAVE_EFFICIENT_UNALIGNED_STRING_OPS
  294. bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2"
  295. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  296. help
  297. Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could
  298. deal with unaligned access by hardware.
  299. endmenu
  300. source "arch/csky/Kconfig.platforms"
  301. source "kernel/Kconfig.hz"