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