xref: /linux/arch/openrisc/Kconfig (revision 134502abfe361784a4e04037cbb76261ab4d835b)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2f8c4a270SJonas Bonn#
3f8c4a270SJonas Bonn# For a description of the syntax of this configuration file,
4cd238effSMauro Carvalho Chehab# see Documentation/kbuild/kconfig-language.rst.
5f8c4a270SJonas Bonn#
6f8c4a270SJonas Bonn
7f8c4a270SJonas Bonnconfig OPENRISC
8f8c4a270SJonas Bonn	def_bool y
9942fa985SYury Norov	select ARCH_32BIT_OFF_T
10a4a4d11aSChristoph Hellwig	select ARCH_HAS_DMA_SET_UNCACHED
11a4a4d11aSChristoph Hellwig	select ARCH_HAS_DMA_CLEAR_UNCACHED
125600779eSChristoph Hellwig	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
13*134502abSMasahiro Yamada	select GENERIC_BUILTIN_DTB
147f435e42SStafford Horne	select COMMON_CLK
15f8c4a270SJonas Bonn	select OF
16f8c4a270SJonas Bonn	select OF_EARLY_FLATTREE
17b4c4c6eeSJonas Bonn	select IRQ_DOMAIN
188636f344SLinus Walleij	select GPIOLIB
19f8c4a270SJonas Bonn	select HAVE_ARCH_TRACEHOOK
20c0fcaf55SJonas Bonn	select SPARSE_IRQ
21f8c4a270SJonas Bonn	select GENERIC_IRQ_CHIP
22f8c4a270SJonas Bonn	select GENERIC_IRQ_PROBE
23f8c4a270SJonas Bonn	select GENERIC_IRQ_SHOW
24ded2ee36SStafford Horne	select GENERIC_PCI_IOMAP
259b994429SBaoquan He	select GENERIC_IOREMAP
269f13a1fdSBen Hutchings	select GENERIC_CPU_DEVICES
27ded2ee36SStafford Horne	select HAVE_PCI
2804ea1e91SAndrew Morton	select HAVE_UID16
295394f1e9SArnd Bergmann	select HAVE_PAGE_SIZE_8KB
300662d33aSRichard Weinberger	select GENERIC_ATOMIC64
318e6d08e0SStefan Kristiansson	select GENERIC_CLOCKEVENTS_BROADCAST
328e6d08e0SStefan Kristiansson	select GENERIC_SMP_IDLE_THREAD
33786d35d4SDavid Howells	select MODULES_USE_ELF_RELA
34d1a1dc0bSDave Hansen	select HAVE_DEBUG_STACKOVERFLOW
354db8e6d2SStefan Kristiansson	select OR1K_PIC
36fff7fb0bSZhaoxiu Zeng	select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
37b5f82176SStafford Horne	select ARCH_USE_QUEUED_RWLOCKS
389b54470aSStafford Horne	select OMPIC if SMP
39ded2ee36SStafford Horne	select PCI_DOMAINS_GENERIC if PCI
40ded2ee36SStafford Horne	select PCI_MSI if PCI
41eecac38bSStafford Horne	select ARCH_WANT_FRAME_POINTERS
42c5ca4560SPalmer Dabbelt	select GENERIC_IRQ_MULTI_HANDLER
436137fed0SPeter Zijlstra	select MMU_GATHER_NO_RANGE if MMU
444aae683fSMasahiro Yamada	select TRACE_IRQFLAGS_SUPPORT
45f8c4a270SJonas Bonn
464c97a0c8SBabu Mogerconfig CPU_BIG_ENDIAN
474c97a0c8SBabu Moger	def_bool y
484c97a0c8SBabu Moger
49f8c4a270SJonas Bonnconfig MMU
50f8c4a270SJonas Bonn	def_bool y
51f8c4a270SJonas Bonn
52f8c4a270SJonas Bonnconfig GENERIC_HWEIGHT
53f8c4a270SJonas Bonn	def_bool y
54f8c4a270SJonas Bonn
55ce816fa8SUwe Kleine-Königconfig NO_IOPORT_MAP
56f8c4a270SJonas Bonn	def_bool y
57f8c4a270SJonas Bonn
58f8c4a270SJonas Bonn# For now, use generic checksum functions
59f8c4a270SJonas Bonn#These can be reimplemented in assembly later if so inclined
60f8c4a270SJonas Bonnconfig GENERIC_CSUM
61f8c4a270SJonas Bonn	def_bool y
62f8c4a270SJonas Bonn
63eecac38bSStafford Horneconfig STACKTRACE_SUPPORT
64eecac38bSStafford Horne	def_bool y
65eecac38bSStafford Horne
6678cdfb5cSStafford Horneconfig LOCKDEP_SUPPORT
6778cdfb5cSStafford Horne	def_bool  y
6878cdfb5cSStafford Horne
691037d186SStafford Horneconfig FIX_EARLYCON_MEM
701037d186SStafford Horne	def_bool y
711037d186SStafford Horne
72f8c4a270SJonas Bonnmenu "Processor type and features"
73f8c4a270SJonas Bonn
74f8c4a270SJonas Bonnchoice
75f8c4a270SJonas Bonn	prompt "Subarchitecture"
76f8c4a270SJonas Bonn	default OR1K_1200
77f8c4a270SJonas Bonn
78f8c4a270SJonas Bonnconfig OR1K_1200
79f8c4a270SJonas Bonn	bool "OR1200"
80f8c4a270SJonas Bonn	help
81f8c4a270SJonas Bonn	  Generic OpenRISC 1200 architecture
82f8c4a270SJonas Bonn
83f8c4a270SJonas Bonnendchoice
84f8c4a270SJonas Bonn
854ee93d80SJan Henrik Weinstockconfig DCACHE_WRITETHROUGH
864ee93d80SJan Henrik Weinstock	bool "Have write through data caches"
874ee93d80SJan Henrik Weinstock	default n
884ee93d80SJan Henrik Weinstock	help
894ee93d80SJan Henrik Weinstock	  Select this if your implementation features write through data caches.
904ee93d80SJan Henrik Weinstock	  Selecting 'N' here will allow the kernel to force flushing of data
914ee93d80SJan Henrik Weinstock	  caches at relevant times. Most OpenRISC implementations support write-
924ee93d80SJan Henrik Weinstock	  through data caches.
934ee93d80SJan Henrik Weinstock
944ee93d80SJan Henrik Weinstock	  If unsure say N here
954ee93d80SJan Henrik Weinstock
96*134502abSMasahiro Yamadaconfig BUILTIN_DTB_NAME
97f8c4a270SJonas Bonn	string "Builtin DTB"
98f8c4a270SJonas Bonn	default ""
99f8c4a270SJonas Bonn
100f8c4a270SJonas Bonnmenu "Class II Instructions"
101f8c4a270SJonas Bonn
102f8c4a270SJonas Bonnconfig OPENRISC_HAVE_INST_FF1
103f8c4a270SJonas Bonn	bool "Have instruction l.ff1"
104f8c4a270SJonas Bonn	default y
105f8c4a270SJonas Bonn	help
106f8c4a270SJonas Bonn	  Select this if your implementation has the Class II instruction l.ff1
107f8c4a270SJonas Bonn
108f8c4a270SJonas Bonnconfig OPENRISC_HAVE_INST_FL1
109f8c4a270SJonas Bonn	bool "Have instruction l.fl1"
110f8c4a270SJonas Bonn	default y
111f8c4a270SJonas Bonn	help
112f8c4a270SJonas Bonn	  Select this if your implementation has the Class II instruction l.fl1
113f8c4a270SJonas Bonn
114f8c4a270SJonas Bonnconfig OPENRISC_HAVE_INST_MUL
115f8c4a270SJonas Bonn	bool "Have instruction l.mul for hardware multiply"
116f8c4a270SJonas Bonn	default y
117f8c4a270SJonas Bonn	help
118f8c4a270SJonas Bonn	  Select this if your implementation has a hardware multiply instruction
119f8c4a270SJonas Bonn
120f8c4a270SJonas Bonnconfig OPENRISC_HAVE_INST_DIV
121f8c4a270SJonas Bonn	bool "Have instruction l.div for hardware divide"
122f8c4a270SJonas Bonn	default y
123f8c4a270SJonas Bonn	help
124f8c4a270SJonas Bonn	  Select this if your implementation has a hardware divide instruction
12587e387acSStafford Horne
12687e387acSStafford Horneconfig OPENRISC_HAVE_INST_CMOV
12787e387acSStafford Horne	bool "Have instruction l.cmov for conditional move"
12887e387acSStafford Horne	default n
12987e387acSStafford Horne	help
13087e387acSStafford Horne	  This config enables gcc to generate l.cmov instructions when compiling
13187e387acSStafford Horne	  the kernel which in general will improve performance and reduce the
13287e387acSStafford Horne	  binary size.
13387e387acSStafford Horne
13487e387acSStafford Horne	  Select this if your implementation has support for the Class II
13587e387acSStafford Horne	  l.cmov conistional move instruction.
13687e387acSStafford Horne
13787e387acSStafford Horne	  Say N if you are unsure.
13887e387acSStafford Horne
13987e387acSStafford Horneconfig OPENRISC_HAVE_INST_ROR
14087e387acSStafford Horne	bool "Have instruction l.ror for rotate right"
14187e387acSStafford Horne	default n
14287e387acSStafford Horne	help
14387e387acSStafford Horne	  This config enables gcc to generate l.ror instructions when compiling
14487e387acSStafford Horne	  the kernel which in general will improve performance and reduce the
14587e387acSStafford Horne	  binary size.
14687e387acSStafford Horne
14787e387acSStafford Horne	  Select this if your implementation has support for the Class II
14887e387acSStafford Horne	  l.ror rotate right instruction.
14987e387acSStafford Horne
15087e387acSStafford Horne	  Say N if you are unsure.
15187e387acSStafford Horne
15287e387acSStafford Horneconfig OPENRISC_HAVE_INST_RORI
15387e387acSStafford Horne	bool "Have instruction l.rori for rotate right with immediate"
15487e387acSStafford Horne	default n
15587e387acSStafford Horne	help
15687e387acSStafford Horne	  This config enables gcc to generate l.rori instructions when compiling
15787e387acSStafford Horne	  the kernel which in general will improve performance and reduce the
15887e387acSStafford Horne	  binary size.
15987e387acSStafford Horne
16087e387acSStafford Horne	  Select this if your implementation has support for the Class II
16187e387acSStafford Horne	  l.rori rotate right with immediate instruction.
16287e387acSStafford Horne
16387e387acSStafford Horne	  Say N if you are unsure.
16487e387acSStafford Horne
16587e387acSStafford Horneconfig OPENRISC_HAVE_INST_SEXT
16687e387acSStafford Horne	bool "Have instructions l.ext* for sign extension"
16787e387acSStafford Horne	default n
16887e387acSStafford Horne	help
16987e387acSStafford Horne	  This config enables gcc to generate l.ext* instructions when compiling
17087e387acSStafford Horne	  the kernel which in general will improve performance and reduce the
17187e387acSStafford Horne	  binary size.
17287e387acSStafford Horne
17387e387acSStafford Horne	  Select this if your implementation has support for the Class II
17487e387acSStafford Horne	  l.exths, l.extbs, l.exthz and l.extbz size extend instructions.
17587e387acSStafford Horne
17687e387acSStafford Horne	  Say N if you are unsure.
17787e387acSStafford Horne
178f8c4a270SJonas Bonnendmenu
179f8c4a270SJonas Bonn
18034bbdcdcSStafford Horneconfig NR_CPUS
1818e6d08e0SStefan Kristiansson	int "Maximum number of CPUs (2-32)"
1828e6d08e0SStefan Kristiansson	range 2 32
1838e6d08e0SStefan Kristiansson	depends on SMP
1848e6d08e0SStefan Kristiansson	default "2"
1858e6d08e0SStefan Kristiansson
1868e6d08e0SStefan Kristianssonconfig SMP
1878e6d08e0SStefan Kristiansson	bool "Symmetric Multi-Processing support"
1888e6d08e0SStefan Kristiansson	help
1898e6d08e0SStefan Kristiansson	  This enables support for systems with more than one CPU. If you have
1908e6d08e0SStefan Kristiansson	  a system with only one CPU, say N. If you have a system with more
1918e6d08e0SStefan Kristiansson	  than one CPU, say Y.
1928e6d08e0SStefan Kristiansson
1938e6d08e0SStefan Kristiansson	  If you don't know what to do here, say N.
194f8c4a270SJonas Bonn
1951f33446dSStafford Horneconfig FPU
1961f33446dSStafford Horne	bool "FPU support"
1971f33446dSStafford Horne	default y
1981f33446dSStafford Horne	help
1991f33446dSStafford Horne	  Say N here if you want to disable all floating-point related procedures
2001f33446dSStafford Horne	  in the kernel and reduce binary size.
2011f33446dSStafford Horne
2021f33446dSStafford Horne	  If you don't know what to do here, say Y.
2031f33446dSStafford Horne
2048636a1f9SMasahiro Yamadasource "kernel/Kconfig.hz"
205f8c4a270SJonas Bonn
206f8c4a270SJonas Bonnconfig OPENRISC_NO_SPR_SR_DSX
207f8c4a270SJonas Bonn	bool "use SPR_SR_DSX software emulation" if OR1K_1200
208f8c4a270SJonas Bonn	default y
209f8c4a270SJonas Bonn	help
210f8c4a270SJonas Bonn	  SPR_SR_DSX bit is status register bit indicating whether
211f8c4a270SJonas Bonn	  the last exception has happened in delay slot.
212f8c4a270SJonas Bonn
213f8c4a270SJonas Bonn	  OpenRISC architecture makes it optional to have it implemented
214f8c4a270SJonas Bonn	  in hardware and the OR1200 does not have it.
215f8c4a270SJonas Bonn
216f8c4a270SJonas Bonn	  Say N here if you know that your OpenRISC processor has
217f8c4a270SJonas Bonn	  SPR_SR_DSX bit implemented. Say Y if you are unsure.
218f8c4a270SJonas Bonn
21991993c8cSStefan Kristianssonconfig OPENRISC_HAVE_SHADOW_GPRS
22091993c8cSStefan Kristiansson	bool "Support for shadow gpr files" if !SMP
22191993c8cSStefan Kristiansson	default y if SMP
22291993c8cSStefan Kristiansson	help
22391993c8cSStefan Kristiansson	  Say Y here if your OpenRISC processor features shadowed
22491993c8cSStefan Kristiansson	  register files. They will in such case be used as a
22591993c8cSStefan Kristiansson	  scratch reg storage on exception entry.
22691993c8cSStefan Kristiansson
22791993c8cSStefan Kristiansson	  On SMP systems, this feature is mandatory.
22891993c8cSStefan Kristiansson	  On a unicore system it's safe to say N here if you are unsure.
22991993c8cSStefan Kristiansson
230f8c4a270SJonas Bonnconfig CMDLINE
231f8c4a270SJonas Bonn	string "Default kernel command string"
232f8c4a270SJonas Bonn	default ""
233f8c4a270SJonas Bonn	help
234f8c4a270SJonas Bonn	  On some architectures there is currently no way for the boot loader
235f8c4a270SJonas Bonn	  to pass arguments to the kernel. For these architectures, you should
236f8c4a270SJonas Bonn	  supply some command-line options at build time by entering them
237f8c4a270SJonas Bonn	  here.
238f8c4a270SJonas Bonn
239f8c4a270SJonas Bonnmenu "Debugging options"
240f8c4a270SJonas Bonn
241f8c4a270SJonas Bonnconfig JUMP_UPON_UNHANDLED_EXCEPTION
242f8c4a270SJonas Bonn	bool "Try to die gracefully"
243f8c4a270SJonas Bonn	default y
244f8c4a270SJonas Bonn	help
245f8c4a270SJonas Bonn	  Now this puts kernel into infinite loop after first oops. Till
246f8c4a270SJonas Bonn	  your kernel crashes this doesn't have any influence.
247f8c4a270SJonas Bonn
248f8c4a270SJonas Bonn	  Say Y if you are unsure.
249f8c4a270SJonas Bonn
250f8c4a270SJonas Bonnconfig OPENRISC_ESR_EXCEPTION_BUG_CHECK
251f8c4a270SJonas Bonn	bool "Check for possible ESR exception bug"
252f8c4a270SJonas Bonn	default n
253f8c4a270SJonas Bonn	help
254f8c4a270SJonas Bonn	  This option enables some checks that might expose some problems
255f8c4a270SJonas Bonn	  in kernel.
256f8c4a270SJonas Bonn
257f8c4a270SJonas Bonn	  Say N if you are unsure.
258f8c4a270SJonas Bonn
259f8c4a270SJonas Bonnendmenu
260f8c4a270SJonas Bonn
261f8c4a270SJonas Bonnendmenu
262