Kconfig 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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_DMA_PREP_COHERENT
  6. select ARCH_HAS_GCOV_PROFILE_ALL
  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
  11. select ARCH_USE_QUEUED_SPINLOCKS
  12. select ARCH_INLINE_READ_LOCK if !PREEMPTION
  13. select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
  14. select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
  15. select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION
  16. select ARCH_INLINE_READ_UNLOCK if !PREEMPTION
  17. select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION
  18. select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION
  19. select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION
  20. select ARCH_INLINE_WRITE_LOCK if !PREEMPTION
  21. select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION
  22. select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION
  23. select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION
  24. select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION
  25. select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION
  26. select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION
  27. select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION
  28. select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION
  29. select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION
  30. select ARCH_INLINE_SPIN_LOCK if !PREEMPTION
  31. select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION
  32. select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION
  33. select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION
  34. select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION
  35. select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
  36. select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
  37. select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
  38. select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace)
  39. select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  40. select COMMON_CLK
  41. select CLKSRC_MMIO
  42. select CSKY_MPINTC if CPU_CK860
  43. select CSKY_MP_TIMER if CPU_CK860
  44. select CSKY_APB_INTC
  45. select DMA_DIRECT_REMAP
  46. select IRQ_DOMAIN
  47. select DW_APB_TIMER_OF
  48. select GENERIC_IOREMAP
  49. select GENERIC_LIB_ASHLDI3
  50. select GENERIC_LIB_ASHRDI3
  51. select GENERIC_LIB_LSHRDI3
  52. select GENERIC_LIB_MULDI3
  53. select GENERIC_LIB_CMPDI2
  54. select GENERIC_LIB_UCMPDI2
  55. select GENERIC_ALLOCATOR
  56. select GENERIC_ATOMIC64
  57. select GENERIC_CPU_DEVICES
  58. select GENERIC_IRQ_CHIP
  59. select GENERIC_IRQ_PROBE
  60. select GENERIC_IRQ_SHOW
  61. select GENERIC_IRQ_MULTI_HANDLER
  62. select GENERIC_SCHED_CLOCK
  63. select GENERIC_SMP_IDLE_THREAD
  64. select GENERIC_TIME_VSYSCALL
  65. select GENERIC_VDSO_32
  66. select GENERIC_GETTIMEOFDAY
  67. select GX6605S_TIMER if CPU_CK610
  68. select HAVE_ARCH_TRACEHOOK
  69. select HAVE_ARCH_AUDITSYSCALL
  70. select HAVE_ARCH_JUMP_LABEL if !CPU_CK610
  71. select HAVE_ARCH_JUMP_LABEL_RELATIVE
  72. select HAVE_ARCH_MMAP_RND_BITS
  73. select HAVE_ARCH_SECCOMP_FILTER
  74. select HAVE_CONTEXT_TRACKING_USER
  75. select HAVE_VIRT_CPU_ACCOUNTING_GEN
  76. select HAVE_DEBUG_BUGVERBOSE
  77. select HAVE_DEBUG_KMEMLEAK
  78. select HAVE_DYNAMIC_FTRACE
  79. select HAVE_DYNAMIC_FTRACE_WITH_REGS
  80. select HAVE_GENERIC_VDSO
  81. select HAVE_FUNCTION_TRACER
  82. select HAVE_FUNCTION_GRAPH_TRACER
  83. select HAVE_FUNCTION_ERROR_INJECTION
  84. select HAVE_FTRACE_MCOUNT_RECORD
  85. select HAVE_KERNEL_GZIP
  86. select HAVE_KERNEL_LZO
  87. select HAVE_KERNEL_LZMA
  88. select HAVE_KPROBES if !CPU_CK610
  89. select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
  90. select HAVE_KRETPROBES if !CPU_CK610
  91. select HAVE_PERF_EVENTS
  92. select HAVE_PERF_REGS
  93. select HAVE_PERF_USER_STACK_DUMP
  94. select HAVE_DMA_CONTIGUOUS
  95. select HAVE_REGS_AND_STACK_ACCESS_API
  96. select HAVE_RSEQ
  97. select HAVE_STACKPROTECTOR
  98. select HAVE_SYSCALL_TRACEPOINTS
  99. select LOCK_MM_AND_FIND_VMA
  100. select MAY_HAVE_SPARSE_IRQ
  101. select MODULES_USE_ELF_RELA if MODULES
  102. select OF
  103. select OF_EARLY_FLATTREE
  104. select PERF_USE_VMALLOC if CPU_CK610
  105. select RTC_LIB
  106. select TIMER_OF
  107. select GENERIC_PCI_IOMAP
  108. select HAVE_PCI
  109. select PCI_DOMAINS_GENERIC if PCI
  110. select PCI_SYSCALL if PCI
  111. select PCI_MSI if PCI
  112. select TRACE_IRQFLAGS_SUPPORT
  113. config LOCKDEP_SUPPORT
  114. def_bool y
  115. config ARCH_SUPPORTS_UPROBES
  116. def_bool y if !CPU_CK610
  117. config CPU_HAS_CACHEV2
  118. bool
  119. config CPU_HAS_FPUV2
  120. bool
  121. config CPU_HAS_HILO
  122. bool
  123. config CPU_HAS_TLBI
  124. bool
  125. config CPU_HAS_LDSTEX
  126. bool
  127. help
  128. For SMP, CPU needs "ldex&stex" instructions for atomic operations.
  129. config CPU_NEED_TLBSYNC
  130. bool
  131. config CPU_NEED_SOFTALIGN
  132. bool
  133. config CPU_NO_USER_BKPT
  134. bool
  135. help
  136. For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
  137. abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
  138. So we need a 16bit instruction as user space bkpt, and it will cause an illegal
  139. instruction exception.
  140. In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
  141. config GENERIC_CALIBRATE_DELAY
  142. def_bool y
  143. config GENERIC_CSUM
  144. def_bool y
  145. config GENERIC_HWEIGHT
  146. def_bool y
  147. config MMU
  148. def_bool y
  149. config STACKTRACE_SUPPORT
  150. def_bool y
  151. config TIME_LOW_RES
  152. def_bool y
  153. config CPU_TLB_SIZE
  154. int
  155. default "128" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
  156. default "1024" if (CPU_CK860)
  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 Meory)
  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 ARCH_FORCE_MAX_ORDER
  283. int "Maximum zone order"
  284. default "11"
  285. config DRAM_BASE
  286. hex "DRAM start addr (the same with memory-section in dts)"
  287. default 0x0
  288. config HOTPLUG_CPU
  289. bool "Support for hot-pluggable CPUs"
  290. select GENERIC_IRQ_MIGRATION
  291. depends on SMP
  292. help
  293. Say Y here to allow turning CPUs off and on. CPUs can be
  294. controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
  295. Say N if you want to disable CPU hotplug.
  296. config HAVE_EFFICIENT_UNALIGNED_STRING_OPS
  297. bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2"
  298. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  299. help
  300. Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could
  301. deal with unaligned access by hardware.
  302. endmenu
  303. source "arch/csky/Kconfig.platforms"
  304. source "kernel/Kconfig.hz"