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