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