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