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