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