Kconfig 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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 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_FUNCTION_TRACER
  81. select HAVE_FUNCTION_GRAPH_TRACER
  82. select HAVE_FUNCTION_ERROR_INJECTION
  83. select HAVE_KERNEL_GZIP
  84. select HAVE_KERNEL_LZO
  85. select HAVE_KERNEL_LZMA
  86. select HAVE_KPROBES if !CPU_CK610
  87. select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
  88. select HAVE_KRETPROBES if !CPU_CK610
  89. select HAVE_PAGE_SIZE_4KB
  90. select HAVE_PERF_EVENTS
  91. select HAVE_PERF_REGS
  92. select HAVE_PERF_USER_STACK_DUMP
  93. select HAVE_DMA_CONTIGUOUS
  94. select HAVE_REGS_AND_STACK_ACCESS_API
  95. select HAVE_STACKPROTECTOR
  96. select HAVE_SYSCALL_TRACEPOINTS
  97. select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
  98. select LOCK_MM_AND_FIND_VMA
  99. select MAY_HAVE_SPARSE_IRQ
  100. select MODULES_USE_ELF_RELA if MODULES
  101. select OF
  102. select OF_EARLY_FLATTREE
  103. select PERF_USE_VMALLOC if CPU_CK610
  104. select RTC_LIB
  105. select TIMER_OF
  106. select GENERIC_PCI_IOMAP
  107. select HAVE_PCI
  108. select PCI_DOMAINS_GENERIC if PCI
  109. select PCI_SYSCALL if PCI
  110. select PCI_MSI if PCI
  111. select TRACE_IRQFLAGS_SUPPORT
  112. config LOCKDEP_SUPPORT
  113. def_bool y
  114. config ARCH_SUPPORTS_UPROBES
  115. def_bool y if !CPU_CK610
  116. config CPU_HAS_CACHEV2
  117. bool
  118. config CPU_HAS_FPUV2
  119. bool
  120. config CPU_HAS_HILO
  121. bool
  122. config CPU_HAS_TLBI
  123. bool
  124. config CPU_HAS_LDSTEX
  125. bool
  126. help
  127. For SMP, CPU needs "ldex&stex" instructions for atomic operations.
  128. config CPU_NEED_TLBSYNC
  129. bool
  130. config CPU_NEED_SOFTALIGN
  131. bool
  132. config CPU_NO_USER_BKPT
  133. bool
  134. help
  135. For abiv2 we couldn't use "trap 1" as user space bkpt in gdbserver, because
  136. abiv2 is 16/32bit instruction set and "trap 1" is 32bit.
  137. So we need a 16bit instruction as user space bkpt, and it will cause an illegal
  138. instruction exception.
  139. In kernel we parse the *regs->pc to determine whether to send SIGTRAP or not.
  140. config GENERIC_CALIBRATE_DELAY
  141. def_bool y
  142. config GENERIC_CSUM
  143. def_bool y
  144. config GENERIC_HWEIGHT
  145. def_bool y
  146. config MMU
  147. def_bool y
  148. config STACKTRACE_SUPPORT
  149. def_bool y
  150. config TIME_LOW_RES
  151. def_bool y
  152. config CPU_ASID_BITS
  153. int
  154. default "8" if (CPU_CK610 || CPU_CK807 || CPU_CK810)
  155. default "12" if (CPU_CK860)
  156. config L1_CACHE_SHIFT
  157. int
  158. default "4" if (CPU_CK610)
  159. default "5" if (CPU_CK807 || CPU_CK810)
  160. default "6" if (CPU_CK860)
  161. config ARCH_MMAP_RND_BITS_MIN
  162. default 8
  163. # max bits determined by the following formula:
  164. # VA_BITS - PAGE_SHIFT - 3
  165. config ARCH_MMAP_RND_BITS_MAX
  166. default 17
  167. menu "Processor type and features"
  168. choice
  169. prompt "CPU MODEL"
  170. default CPU_CK807
  171. config CPU_CK610
  172. bool "CSKY CPU ck610"
  173. select CPU_NEED_TLBSYNC
  174. select CPU_NEED_SOFTALIGN
  175. select CPU_NO_USER_BKPT
  176. config CPU_CK810
  177. bool "CSKY CPU ck810"
  178. select CPU_HAS_HILO
  179. select CPU_NEED_TLBSYNC
  180. config CPU_CK807
  181. bool "CSKY CPU ck807"
  182. select CPU_HAS_HILO
  183. config CPU_CK860
  184. bool "CSKY CPU ck860"
  185. select CPU_HAS_TLBI
  186. select CPU_HAS_CACHEV2
  187. select CPU_HAS_LDSTEX
  188. select CPU_HAS_FPUV2
  189. endchoice
  190. choice
  191. prompt "PAGE OFFSET"
  192. default PAGE_OFFSET_80000000
  193. config PAGE_OFFSET_80000000
  194. bool "PAGE OFFSET 2G (user:kernel = 2:2)"
  195. config PAGE_OFFSET_A0000000
  196. bool "PAGE OFFSET 2.5G (user:kernel = 2.5:1.5)"
  197. endchoice
  198. config PAGE_OFFSET
  199. hex
  200. default 0x80000000 if PAGE_OFFSET_80000000
  201. default 0xa0000000 if PAGE_OFFSET_A0000000
  202. choice
  203. prompt "C-SKY PMU type"
  204. depends on PERF_EVENTS
  205. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  206. config CPU_PMU_NONE
  207. bool "None"
  208. config CSKY_PMU_V1
  209. bool "Performance Monitoring Unit Ver.1"
  210. endchoice
  211. choice
  212. prompt "Power Manager Instruction (wait/doze/stop)"
  213. default CPU_PM_NONE
  214. config CPU_PM_NONE
  215. bool "None"
  216. config CPU_PM_WAIT
  217. bool "wait"
  218. config CPU_PM_DOZE
  219. bool "doze"
  220. config CPU_PM_STOP
  221. bool "stop"
  222. endchoice
  223. menuconfig HAVE_TCM
  224. bool "Tightly-Coupled/Sram Memory"
  225. depends on !COMPILE_TEST
  226. help
  227. The implementation are not only used by TCM (Tightly-Coupled Memory)
  228. but also used by sram on SOC bus. It follow existed linux tcm
  229. software interface, so that old tcm application codes could be
  230. re-used directly.
  231. if HAVE_TCM
  232. config ITCM_RAM_BASE
  233. hex "ITCM ram base"
  234. default 0xffffffff
  235. config ITCM_NR_PAGES
  236. int "Page count of ITCM size: NR*4KB"
  237. range 1 256
  238. default 32
  239. config HAVE_DTCM
  240. bool "DTCM Support"
  241. config DTCM_RAM_BASE
  242. hex "DTCM ram base"
  243. depends on HAVE_DTCM
  244. default 0xffffffff
  245. config DTCM_NR_PAGES
  246. int "Page count of DTCM size: NR*4KB"
  247. depends on HAVE_DTCM
  248. range 1 256
  249. default 32
  250. endif
  251. config CPU_HAS_VDSP
  252. bool "CPU has VDSP coprocessor"
  253. depends on CPU_HAS_FPU && CPU_HAS_FPUV2
  254. config CPU_HAS_FPU
  255. bool "CPU has FPU coprocessor"
  256. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  257. config CPU_HAS_ICACHE_INS
  258. bool "CPU has Icache invalidate instructions"
  259. depends on CPU_HAS_CACHEV2
  260. config CPU_HAS_TEE
  261. bool "CPU has Trusted Execution Environment"
  262. depends on CPU_CK810
  263. config SMP
  264. bool "Symmetric Multi-Processing (SMP) support for C-SKY"
  265. depends on CPU_CK860
  266. default n
  267. config NR_CPUS
  268. int "Maximum number of CPUs (2-32)"
  269. range 2 32
  270. depends on SMP
  271. default "4"
  272. config HIGHMEM
  273. bool "High Memory Support"
  274. depends on !CPU_CK610
  275. select KMAP_LOCAL
  276. default y
  277. config DRAM_BASE
  278. hex "DRAM start addr (the same with memory-section in dts)"
  279. default 0x0
  280. config HOTPLUG_CPU
  281. bool "Support for hot-pluggable CPUs"
  282. select GENERIC_IRQ_MIGRATION
  283. depends on SMP
  284. help
  285. Say Y here to allow turning CPUs off and on. CPUs can be
  286. controlled through /sys/devices/system/cpu/cpu1/hotplug/target.
  287. Say N if you want to disable CPU hotplug.
  288. config HAVE_EFFICIENT_UNALIGNED_STRING_OPS
  289. bool "Enable EFFICIENT_UNALIGNED_STRING_OPS for abiv2"
  290. depends on CPU_CK807 || CPU_CK810 || CPU_CK860
  291. help
  292. Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could
  293. deal with unaligned access by hardware.
  294. endmenu
  295. source "arch/csky/Kconfig.platforms"
  296. source "kernel/Kconfig.hz"