Merge branch '2022-01-18-platform-updates'
[platform/kernel/u-boot.git] / arch / Kconfig
1 config ARCH_MAP_SYSMEM
2         depends on SANDBOX || NDS32
3         def_bool y
4
5 config CREATE_ARCH_SYMLINK
6         bool
7
8 config HAVE_ARCH_IOREMAP
9         bool
10
11 config NEEDS_MANUAL_RELOC
12         bool
13
14 config SYS_CACHE_SHIFT_4
15         bool
16
17 config SYS_CACHE_SHIFT_5
18         bool
19
20 config SYS_CACHE_SHIFT_6
21         bool
22
23 config SYS_CACHE_SHIFT_7
24         bool
25
26 config SYS_CACHELINE_SIZE
27         int
28         default 128 if SYS_CACHE_SHIFT_7
29         default 64 if SYS_CACHE_SHIFT_6
30         default 32 if SYS_CACHE_SHIFT_5
31         default 16 if SYS_CACHE_SHIFT_4
32         # Fall-back for MIPS
33         default 32 if MIPS
34
35 config LINKER_LIST_ALIGN
36         int
37         default 32 if SANDBOX
38         default 8 if ARM64 || X86
39         default 4
40         help
41           Force the each linker list to be aligned to this boundary. This
42           is required if ll_entry_get() is used, since otherwise the linker
43           may add padding into the table, thus breaking it.
44           See linker_lists.rst for full details.
45
46 choice
47         prompt "Architecture select"
48         default SANDBOX
49
50 config ARC
51         bool "ARC architecture"
52         select ARC_TIMER
53         select CLK
54         select DM
55         select HAVE_PRIVATE_LIBGCC
56         select SUPPORT_OF_CONTROL
57         select SYS_CACHE_SHIFT_7
58         select TIMER
59
60 config ARM
61         bool "ARM architecture"
62         select ARCH_SUPPORTS_LTO
63         select CREATE_ARCH_SYMLINK
64         select HAVE_PRIVATE_LIBGCC if !ARM64
65         select SUPPORT_OF_CONTROL
66
67 config M68K
68         bool "M68000 architecture"
69         select HAVE_PRIVATE_LIBGCC
70         select NEEDS_MANUAL_RELOC
71         select SYS_BOOT_GET_CMDLINE
72         select SYS_BOOT_GET_KBD
73         select SYS_CACHE_SHIFT_4
74         select SUPPORT_OF_CONTROL
75
76 config MICROBLAZE
77         bool "MicroBlaze architecture"
78         select NEEDS_MANUAL_RELOC
79         select SUPPORT_OF_CONTROL
80         imply CMD_IRQ
81
82 config MIPS
83         bool "MIPS architecture"
84         select HAVE_ARCH_IOREMAP
85         select HAVE_PRIVATE_LIBGCC
86         select SUPPORT_OF_CONTROL
87
88 config NDS32
89         bool "NDS32 architecture"
90         select SUPPORT_OF_CONTROL
91
92 config NIOS2
93         bool "Nios II architecture"
94         select CPU
95         select DM
96         select OF_CONTROL
97         select SUPPORT_OF_CONTROL
98         imply CMD_DM
99
100 config PPC
101         bool "PowerPC architecture"
102         select HAVE_PRIVATE_LIBGCC
103         select SUPPORT_OF_CONTROL
104         select SYS_BOOT_GET_CMDLINE
105         select SYS_BOOT_GET_KBD
106
107 config RISCV
108         bool "RISC-V architecture"
109         select CREATE_ARCH_SYMLINK
110         select SUPPORT_OF_CONTROL
111         select OF_CONTROL
112         select DM
113         imply DM_SERIAL
114         imply DM_ETH
115         imply DM_MMC
116         imply DM_SPI
117         imply DM_SPI_FLASH
118         imply BLK
119         imply CLK
120         imply MTD
121         imply TIMER
122         imply CMD_DM
123         imply SPL_DM
124         imply SPL_OF_CONTROL
125         imply SPL_LIBCOMMON_SUPPORT
126         imply SPL_LIBGENERIC_SUPPORT
127         imply SPL_SERIAL
128         imply SPL_TIMER
129
130 config SANDBOX
131         bool "Sandbox"
132         select ARCH_SUPPORTS_LTO
133         select BOARD_LATE_INIT
134         select BZIP2
135         select CMD_POWEROFF
136         select DM
137         select DM_GPIO
138         select DM_I2C
139         select DM_KEYBOARD
140         select DM_MMC
141         select DM_SERIAL
142         select DM_SPI
143         select DM_SPI_FLASH
144         select GZIP_COMPRESSED
145         select HAVE_BLOCK_DEVICE
146         select LZO
147         select OF_BOARD_SETUP
148         select PCI_ENDPOINT
149         select SPI
150         select SUPPORT_OF_CONTROL
151         select SYSRESET_CMD_POWEROFF
152         select SYS_CACHE_SHIFT_4
153         select IRQ
154         select SUPPORT_EXTENSION_SCAN
155         imply BITREVERSE
156         select BLOBLIST
157         imply LTO
158         imply CMD_DM
159         imply CMD_EXCEPTION
160         imply CMD_GETTIME
161         imply CMD_HASH
162         imply CMD_IO
163         imply CMD_IOTRACE
164         imply CMD_LZMADEC
165         imply CMD_SATA
166         imply CMD_SF
167         imply CMD_SF_TEST
168         imply CRC32_VERIFY
169         imply FAT_WRITE
170         imply FIRMWARE
171         imply HASH_VERIFY
172         imply LZMA
173         imply SCSI
174         imply TEE
175         imply AVB_VERIFY
176         imply LIBAVB
177         imply CMD_AVB
178         imply SCP03
179         imply CMD_SCP03
180         imply UDP_FUNCTION_FASTBOOT
181         imply VIRTIO_MMIO
182         imply VIRTIO_PCI
183         imply VIRTIO_SANDBOX
184         imply VIRTIO_BLK
185         imply VIRTIO_NET
186         imply DM_SOUND
187         imply PCI_SANDBOX_EP
188         imply PCH
189         imply PHYLIB
190         imply DM_MDIO
191         imply DM_MDIO_MUX
192         imply ACPI_PMC
193         imply ACPI_PMC_SANDBOX
194         imply CMD_PMC
195         imply CMD_CLONE
196         imply SILENT_CONSOLE
197         imply BOOTARGS_SUBST
198         imply PHY_FIXED
199         imply DM_DSA
200         imply CMD_EXTENSION
201         imply KEYBOARD
202         imply PHYSMEM
203
204 config SH
205         bool "SuperH architecture"
206         select HAVE_PRIVATE_LIBGCC
207         select SUPPORT_OF_CONTROL
208
209 config X86
210         bool "x86 architecture"
211         select SUPPORT_SPL
212         select SUPPORT_TPL
213         select CREATE_ARCH_SYMLINK
214         select DM
215         select HAVE_ARCH_IOMAP
216         select HAVE_PRIVATE_LIBGCC
217         select OF_CONTROL
218         select PCI
219         select SUPPORT_OF_CONTROL
220         select SYS_CACHE_SHIFT_6
221         select TIMER
222         select USE_PRIVATE_LIBGCC
223         select X86_TSC_TIMER
224         select IRQ
225         imply HAS_ROM if X86_RESET_VECTOR
226         imply BLK
227         imply CMD_DM
228         imply CMD_FPGA_LOADMK
229         imply CMD_GETTIME
230         imply CMD_IO
231         imply CMD_IRQ
232         imply CMD_PCI
233         imply CMD_SF
234         imply CMD_SF_TEST
235         imply CMD_ZBOOT
236         imply DM_ETH
237         imply DM_GPIO
238         imply DM_KEYBOARD
239         imply DM_MMC
240         imply DM_RTC
241         imply DM_SCSI
242         imply DM_SERIAL
243         imply DM_SPI
244         imply DM_SPI_FLASH
245         imply DM_USB
246         imply DM_VIDEO
247         imply SYSRESET
248         imply SPL_SYSRESET
249         imply SYSRESET_X86
250         imply USB_ETHER_ASIX
251         imply USB_ETHER_SMSC95XX
252         imply USB_HOST_ETHER
253         imply PCH
254         imply PHYSMEM
255         imply RTC_MC146818
256         imply ACPIGEN if !QEMU
257         imply SYSINFO if GENERATE_SMBIOS_TABLE
258         imply SYSINFO_SMBIOS if GENERATE_SMBIOS_TABLE
259
260         # Thing to enable for when SPL/TPL are enabled: SPL
261         imply SPL_DM
262         imply SPL_OF_LIBFDT
263         imply SPL_DRIVERS_MISC
264         imply SPL_GPIO
265         imply SPL_PINCTRL
266         imply SPL_LIBCOMMON_SUPPORT
267         imply SPL_LIBGENERIC_SUPPORT
268         imply SPL_SERIAL
269         imply SPL_SPI_FLASH_SUPPORT
270         imply SPL_SPI
271         imply SPL_OF_CONTROL
272         imply SPL_TIMER
273         imply SPL_REGMAP
274         imply SPL_SYSCON
275         # TPL
276         imply TPL_DM
277         imply TPL_DRIVERS_MISC
278         imply TPL_GPIO
279         imply TPL_PINCTRL
280         imply TPL_LIBCOMMON_SUPPORT
281         imply TPL_LIBGENERIC_SUPPORT
282         imply TPL_SERIAL
283         imply TPL_OF_CONTROL
284         imply TPL_TIMER
285         imply TPL_REGMAP
286         imply TPL_SYSCON
287
288 config XTENSA
289         bool "Xtensa architecture"
290         select CREATE_ARCH_SYMLINK
291         select SUPPORT_OF_CONTROL
292
293 endchoice
294
295 config SYS_ARCH
296         string
297         help
298           This option should contain the architecture name to build the
299           appropriate arch/<CONFIG_SYS_ARCH> directory.
300           All the architectures should specify this option correctly.
301
302 config SYS_CPU
303         string
304         help
305           This option should contain the CPU name to build the correct
306           arch/<CONFIG_SYS_ARCH>/cpu/<CONFIG_SYS_CPU> directory.
307
308           This is optional.  For those targets without the CPU directory,
309           leave this option empty.
310
311 config SYS_SOC
312         string
313         help
314           This option should contain the SoC name to build the directory
315           arch/<CONFIG_SYS_ARCH>/cpu/<CONFIG_SYS_CPU>/<CONFIG_SYS_SOC>.
316
317           This is optional.  For those targets without the SoC directory,
318           leave this option empty.
319
320 config SYS_VENDOR
321         string
322         help
323           This option should contain the vendor name of the target board.
324           If it is set and
325           board/<CONFIG_SYS_VENDOR>/common/Makefile exists, the vendor common
326           directory is compiled.
327           If CONFIG_SYS_BOARD is also set, the sources under
328           board/<CONFIG_SYS_VENDOR>/<CONFIG_SYS_BOARD> directory are compiled.
329
330           This is optional.  For those targets without the vendor directory,
331           leave this option empty.
332
333 config SYS_BOARD
334         string
335         help
336           This option should contain the name of the target board.
337           If it is set, either board/<CONFIG_SYS_VENDOR>/<CONFIG_SYS_BOARD>
338           or board/<CONFIG_SYS_BOARD> directory is compiled depending on
339           whether CONFIG_SYS_VENDOR is set or not.
340
341           This is optional.  For those targets without the board directory,
342           leave this option empty.
343
344 config SYS_CONFIG_NAME
345         string
346         help
347           This option should contain the base name of board header file.
348           The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
349           should be included from include/config.h.
350
351 config SYS_DISABLE_DCACHE_OPS
352         bool
353         help
354          This option disables dcache flush and dcache invalidation
355          operations. For example, on coherent systems where cache
356          operatios are not required, enable this option to avoid them.
357          Note that, its up to the individual architectures to implement
358          this functionality.
359
360 config SYS_IMMR
361         hex
362         depends on PPC || FSL_LSCH2 || FSL_LSCH3 || ARCH_LS1021A
363         default 0xFF000000 if MPC8xx
364         default 0xF0000000 if ARCH_MPC8313
365         default 0xE0000000 if MPC83xx && !ARCH_MPC8313
366         default 0x01000000 if ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
367         default SYS_CCSRBAR_DEFAULT
368         help
369           Address for the Internal Memory-Mapped Registers (IMMR) window used
370           to configure the features of many Freescale / NXP SoCs.
371
372 config SKIP_LOWLEVEL_INIT
373         bool "Skip the calls to certain low level initialization functions"
374         depends on ARM || NDS32 || MIPS || RISCV
375         help
376           If enabled, then certain low level initializations (like setting up
377           the memory controller) are omitted and/or U-Boot does not relocate
378           itself into RAM.
379           Normally this variable MUST NOT be defined. The only exception is
380           when U-Boot is loaded (to RAM) by some other boot loader or by a
381           debugger which performs these initializations itself.
382
383 config SPL_SKIP_LOWLEVEL_INIT
384         bool "Skip the calls to certain low level initialization functions"
385         depends on SPL && (ARM || NDS32 || MIPS || RISCV)
386         help
387           If enabled, then certain low level initializations (like setting up
388           the memory controller) are omitted and/or U-Boot does not relocate
389           itself into RAM.
390           Normally this variable MUST NOT be defined. The only exception is
391           when U-Boot is loaded (to RAM) by some other boot loader or by a
392           debugger which performs these initializations itself.
393
394 config TPL_SKIP_LOWLEVEL_INIT
395         bool "Skip the calls to certain low level initialization functions"
396         depends on SPL && ARM
397         help
398           If enabled, then certain low level initializations (like setting up
399           the memory controller) are omitted and/or U-Boot does not relocate
400           itself into RAM.
401           Normally this variable MUST NOT be defined. The only exception is
402           when U-Boot is loaded (to RAM) by some other boot loader or by a
403           debugger which performs these initializations itself.
404
405 config SKIP_LOWLEVEL_INIT_ONLY
406         bool "Skip the call to lowlevel_init during early boot ONLY"
407         depends on ARM
408         help
409           This allows just the call to lowlevel_init() to be skipped. The
410           normal CP15 init (such as enabling the instruction cache) is still
411           performed.
412
413 config SPL_SKIP_LOWLEVEL_INIT_ONLY
414         bool "Skip the call to lowlevel_init during early boot ONLY"
415         depends on SPL && ARM
416         help
417           This allows just the call to lowlevel_init() to be skipped. The
418           normal CP15 init (such as enabling the instruction cache) is still
419           performed.
420
421 config TPL_SKIP_LOWLEVEL_INIT_ONLY
422         bool "Skip the call to lowlevel_init during early boot ONLY"
423         depends on TPL && ARM
424         help
425           This allows just the call to lowlevel_init() to be skipped. The
426           normal CP15 init (such as enabling the instruction cache) is still
427           performed.
428
429 source "arch/arc/Kconfig"
430 source "arch/arm/Kconfig"
431 source "arch/m68k/Kconfig"
432 source "arch/microblaze/Kconfig"
433 source "arch/mips/Kconfig"
434 source "arch/nds32/Kconfig"
435 source "arch/nios2/Kconfig"
436 source "arch/powerpc/Kconfig"
437 source "arch/sandbox/Kconfig"
438 source "arch/sh/Kconfig"
439 source "arch/x86/Kconfig"
440 source "arch/xtensa/Kconfig"
441 source "arch/riscv/Kconfig"