xref: /openbmc/linux/arch/nios2/Kconfig (revision da2ef666)
1# SPDX-License-Identifier: GPL-2.0
2config NIOS2
3	def_bool y
4	select ARCH_HAS_SYNC_DMA_FOR_CPU
5	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
6	select ARCH_NO_SWAP
7	select DMA_NONCOHERENT_OPS
8	select TIMER_OF
9	select GENERIC_ATOMIC64
10	select GENERIC_CLOCKEVENTS
11	select GENERIC_CPU_DEVICES
12	select GENERIC_IRQ_PROBE
13	select GENERIC_IRQ_SHOW
14	select GENERIC_STRNCPY_FROM_USER
15	select GENERIC_STRNLEN_USER
16	select HAVE_ARCH_TRACEHOOK
17	select HAVE_ARCH_KGDB
18	select IRQ_DOMAIN
19	select MODULES_USE_ELF_RELA
20	select OF
21	select OF_EARLY_FLATTREE
22	select SOC_BUS
23	select SPARSE_IRQ
24	select USB_ARCH_HAS_HCD if USB_SUPPORT
25	select CPU_NO_EFFICIENT_FFS
26
27config GENERIC_CSUM
28	def_bool y
29
30config GENERIC_HWEIGHT
31	def_bool y
32
33config GENERIC_CALIBRATE_DELAY
34	def_bool y
35
36config NO_IOPORT_MAP
37	def_bool y
38
39config HAS_DMA
40	def_bool y
41
42config FPU
43	def_bool n
44
45config RWSEM_GENERIC_SPINLOCK
46	def_bool y
47
48config TRACE_IRQFLAGS_SUPPORT
49	def_bool n
50
51menu "Kernel features"
52
53source "kernel/Kconfig.hz"
54
55config FORCE_MAX_ZONEORDER
56	int "Maximum zone order"
57	range 9 20
58	default "11"
59	help
60	  The kernel memory allocator divides physically contiguous memory
61	  blocks into "zones", where each zone is a power of two number of
62	  pages.  This option selects the largest power of two that the kernel
63	  keeps in the memory allocator.  If you need to allocate very large
64	  blocks of physically contiguous memory, then you may need to
65	  increase this value.
66
67	  This config option is actually maximum order plus one. For example,
68	  a value of 11 means that the largest free memory block is 2^10 pages.
69
70endmenu
71
72source "arch/nios2/platform/Kconfig.platform"
73
74menu "Processor type and features"
75
76config MMU
77	def_bool y
78
79config NR_CPUS
80	int
81	default "1"
82
83config NIOS2_ALIGNMENT_TRAP
84	bool "Catch alignment trap"
85	default y
86	help
87	  Nios II CPUs cannot fetch/store data which is not bus aligned,
88	  i.e., a 2 or 4 byte fetch must start at an address divisible by
89	  2 or 4. Any non-aligned load/store instructions will be trapped and
90	  emulated in software if you say Y here, which has a performance
91	  impact.
92
93comment "Boot options"
94
95config CMDLINE_BOOL
96	bool "Default bootloader kernel arguments"
97	default y
98
99config CMDLINE
100	string "Default kernel command string"
101	default ""
102	depends on CMDLINE_BOOL
103	help
104	  On some platforms, there is currently no way for the boot loader to
105	  pass arguments to the kernel. For these platforms, you can supply
106	  some command-line options at build time by entering them here.  In
107	  other cases you can specify kernel args so that you don't have
108	  to set them up in board prom initialization routines.
109
110config CMDLINE_FORCE
111	bool "Force default kernel command string"
112	depends on CMDLINE_BOOL
113	help
114	  Set this to have arguments from the default kernel command string
115	  override those passed by the boot loader.
116
117config NIOS2_CMDLINE_IGNORE_DTB
118	bool "Ignore kernel command string from DTB"
119	depends on CMDLINE_BOOL
120	depends on !CMDLINE_FORCE
121	default y
122	help
123	  Set this to ignore the bootargs property from the devicetree's
124	  chosen node and fall back to CMDLINE if nothing is passed.
125
126config NIOS2_PASS_CMDLINE
127	bool "Passed kernel command line from u-boot"
128	default n
129	help
130	  Use bootargs env variable from u-boot for kernel command line.
131	  will override "Default kernel command string".
132	  Say N if you are unsure.
133
134config NIOS2_BOOT_LINK_OFFSET
135	hex "Link address offset for booting"
136	default "0x00500000"
137	help
138	  This option allows you to set the link address offset of the zImage.
139	  This can be useful if you are on a board which has a small amount of
140	  memory.
141
142endmenu
143
144menu "Advanced setup"
145
146config ADVANCED_OPTIONS
147	bool "Prompt for advanced kernel configuration options"
148
149comment "Default settings for advanced configuration options are used"
150	depends on !ADVANCED_OPTIONS
151
152config NIOS2_KERNEL_MMU_REGION_BASE_BOOL
153	bool "Set custom kernel MMU region base address"
154	depends on ADVANCED_OPTIONS
155	help
156	  This option allows you to set the virtual address of the kernel MMU region.
157
158	  Say N here unless you know what you are doing.
159
160config NIOS2_KERNEL_MMU_REGION_BASE
161	hex "Virtual base address of the kernel MMU region " if NIOS2_KERNEL_MMU_REGION_BASE_BOOL
162	default "0x80000000"
163	help
164	  This option allows you to set the virtual base address of the kernel MMU region.
165
166config NIOS2_KERNEL_REGION_BASE_BOOL
167	bool "Set custom kernel region base address"
168	depends on ADVANCED_OPTIONS
169	help
170	  This option allows you to set the virtual address of the kernel region.
171
172	  Say N here unless you know what you are doing.
173
174config NIOS2_KERNEL_REGION_BASE
175	hex "Virtual base address of the kernel region " if NIOS2_KERNEL_REGION_BASE_BOOL
176	default "0xc0000000"
177
178config NIOS2_IO_REGION_BASE_BOOL
179	bool "Set custom I/O region base address"
180	depends on ADVANCED_OPTIONS
181	help
182	  This option allows you to set the virtual address of the I/O region.
183
184	  Say N here unless you know what you are doing.
185
186config NIOS2_IO_REGION_BASE
187	hex "Virtual base address of the I/O region" if NIOS2_IO_REGION_BASE_BOOL
188	default "0xe0000000"
189
190endmenu
191