blob: c24955c81c9274e8293bea3006e1a66a2cde3816 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Ley Foon Tan2fc84832014-11-06 15:20:19 +08002config NIOS2
3 def_bool y
Yury Norov942fa982018-05-16 11:18:49 +03004 select ARCH_32BIT_OFF_T
Christoph Hellwigfa7e2242020-02-21 15:55:43 -08005 select ARCH_HAS_DMA_PREP_COHERENT
Christoph Hellwig25622e02018-04-16 19:27:22 +02006 select ARCH_HAS_SYNC_DMA_FOR_CPU
7 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
Christoph Hellwigfa7e2242020-02-21 15:55:43 -08008 select ARCH_HAS_DMA_SET_UNCACHED
Christoph Hellwig17c46a62018-07-31 13:39:29 +02009 select ARCH_NO_SWAP
Dragos Bogdanf26e4332020-04-10 23:38:23 +080010 select COMMON_CLK
Daniel Lezcanobb0eb052017-05-26 19:34:11 +020011 select TIMER_OF
Ley Foon Tan2fc84832014-11-06 15:20:19 +080012 select GENERIC_ATOMIC64
Ley Foon Tan2fc84832014-11-06 15:20:19 +080013 select GENERIC_CPU_DEVICES
14 select GENERIC_IRQ_PROBE
15 select GENERIC_IRQ_SHOW
Ley Foon Tan7f1e6142017-05-08 17:14:14 +080016 select GENERIC_STRNCPY_FROM_USER
17 select GENERIC_STRNLEN_USER
Ley Foon Tan2fc84832014-11-06 15:20:19 +080018 select HAVE_ARCH_TRACEHOOK
Ley Foon Tand16d2be2015-02-16 19:26:43 +080019 select HAVE_ARCH_KGDB
Ley Foon Tan2fc84832014-11-06 15:20:19 +080020 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
Zhaoxiu Zengfff7fb02016-05-20 17:03:57 -070027 select CPU_NO_EFFICIENT_FFS
Peter Zijlstra6137fed2018-09-04 17:04:07 +020028 select MMU_GATHER_NO_RANGE if MMU
Christoph Hellwig5e6e9852020-09-03 16:22:35 +020029 select SET_FS
Ley Foon Tan2fc84832014-11-06 15:20:19 +080030
31config GENERIC_CSUM
32 def_bool y
33
34config GENERIC_HWEIGHT
35 def_bool y
36
37config GENERIC_CALIBRATE_DELAY
38 def_bool y
39
40config NO_IOPORT_MAP
41 def_bool y
42
Ley Foon Tan2fc84832014-11-06 15:20:19 +080043config FPU
44 def_bool n
45
Ley Foon Tan2fc84832014-11-06 15:20:19 +080046config TRACE_IRQFLAGS_SUPPORT
47 def_bool n
48
Ley Foon Tan2fc84832014-11-06 15:20:19 +080049menu "Kernel features"
50
Ley Foon Tan2fc84832014-11-06 15:20:19 +080051source "kernel/Kconfig.hz"
52
Ley Foon Tan2fc84832014-11-06 15:20:19 +080053config FORCE_MAX_ZONEORDER
54 int "Maximum zone order"
55 range 9 20
56 default "11"
57 help
58 The kernel memory allocator divides physically contiguous memory
59 blocks into "zones", where each zone is a power of two number of
60 pages. This option selects the largest power of two that the kernel
61 keeps in the memory allocator. If you need to allocate very large
62 blocks of physically contiguous memory, then you may need to
63 increase this value.
64
65 This config option is actually maximum order plus one. For example,
66 a value of 11 means that the largest free memory block is 2^10 pages.
67
68endmenu
69
70source "arch/nios2/platform/Kconfig.platform"
71
72menu "Processor type and features"
73
74config MMU
75 def_bool y
76
Tobias Klauser6e5c8f52014-11-24 16:13:39 +080077config NR_CPUS
78 int
79 default "1"
80
Ley Foon Tan2fc84832014-11-06 15:20:19 +080081config NIOS2_ALIGNMENT_TRAP
82 bool "Catch alignment trap"
83 default y
84 help
85 Nios II CPUs cannot fetch/store data which is not bus aligned,
86 i.e., a 2 or 4 byte fetch must start at an address divisible by
87 2 or 4. Any non-aligned load/store instructions will be trapped and
88 emulated in software if you say Y here, which has a performance
89 impact.
90
91comment "Boot options"
92
93config CMDLINE_BOOL
94 bool "Default bootloader kernel arguments"
95 default y
96
97config CMDLINE
98 string "Default kernel command string"
99 default ""
100 depends on CMDLINE_BOOL
101 help
102 On some platforms, there is currently no way for the boot loader to
103 pass arguments to the kernel. For these platforms, you can supply
104 some command-line options at build time by entering them here. In
105 other cases you can specify kernel args so that you don't have
106 to set them up in board prom initialization routines.
107
108config CMDLINE_FORCE
109 bool "Force default kernel command string"
110 depends on CMDLINE_BOOL
111 help
112 Set this to have arguments from the default kernel command string
113 override those passed by the boot loader.
114
115config NIOS2_CMDLINE_IGNORE_DTB
116 bool "Ignore kernel command string from DTB"
Tobias Klauser2b2b4072014-11-24 16:40:04 +0800117 depends on CMDLINE_BOOL
Ley Foon Tan2fc84832014-11-06 15:20:19 +0800118 depends on !CMDLINE_FORCE
119 default y
120 help
121 Set this to ignore the bootargs property from the devicetree's
122 chosen node and fall back to CMDLINE if nothing is passed.
123
124config NIOS2_PASS_CMDLINE
125 bool "Passed kernel command line from u-boot"
Ley Foon Tan2fc84832014-11-06 15:20:19 +0800126 help
127 Use bootargs env variable from u-boot for kernel command line.
128 will override "Default kernel command string".
129 Say N if you are unsure.
130
Ley Foon Tan01623622015-02-10 23:26:34 +0800131config NIOS2_BOOT_LINK_OFFSET
132 hex "Link address offset for booting"
133 default "0x00500000"
134 help
135 This option allows you to set the link address offset of the zImage.
136 This can be useful if you are on a board which has a small amount of
137 memory.
138
Ley Foon Tan2fc84832014-11-06 15:20:19 +0800139endmenu
140
141menu "Advanced setup"
142
143config ADVANCED_OPTIONS
144 bool "Prompt for advanced kernel configuration options"
Ley Foon Tan2fc84832014-11-06 15:20:19 +0800145
146comment "Default settings for advanced configuration options are used"
147 depends on !ADVANCED_OPTIONS
148
149config NIOS2_KERNEL_MMU_REGION_BASE_BOOL
150 bool "Set custom kernel MMU region base address"
151 depends on ADVANCED_OPTIONS
152 help
153 This option allows you to set the virtual address of the kernel MMU region.
154
155 Say N here unless you know what you are doing.
156
157config NIOS2_KERNEL_MMU_REGION_BASE
158 hex "Virtual base address of the kernel MMU region " if NIOS2_KERNEL_MMU_REGION_BASE_BOOL
159 default "0x80000000"
160 help
161 This option allows you to set the virtual base address of the kernel MMU region.
162
163config NIOS2_KERNEL_REGION_BASE_BOOL
164 bool "Set custom kernel region base address"
165 depends on ADVANCED_OPTIONS
166 help
167 This option allows you to set the virtual address of the kernel region.
168
169 Say N here unless you know what you are doing.
170
171config NIOS2_KERNEL_REGION_BASE
172 hex "Virtual base address of the kernel region " if NIOS2_KERNEL_REGION_BASE_BOOL
173 default "0xc0000000"
174
175config NIOS2_IO_REGION_BASE_BOOL
176 bool "Set custom I/O region base address"
177 depends on ADVANCED_OPTIONS
178 help
179 This option allows you to set the virtual address of the I/O region.
180
181 Say N here unless you know what you are doing.
182
183config NIOS2_IO_REGION_BASE
184 hex "Virtual base address of the I/O region" if NIOS2_IO_REGION_BASE_BOOL
185 default "0xe0000000"
186
187endmenu