59a7b200891f2521b7320a51e2df98979baa8967
[platform/kernel/u-boot.git] / common / spl / Kconfig
1 menu "SPL / TPL"
2
3 config SUPPORT_SPL
4         bool
5
6 config SUPPORT_TPL
7         bool
8
9 config SPL_DFU_NO_RESET
10         bool
11
12 config SPL
13         bool
14         depends on SUPPORT_SPL
15         prompt "Enable SPL"
16         help
17           If you want to build SPL as well as the normal image, say Y.
18
19 config SPL_FRAMEWORK
20         bool "Support SPL based upon the common SPL framework"
21         depends on SPL
22         default y
23         help
24           Enable the SPL framework under common/spl/.  This framework
25           supports MMC, NAND and YMODEM and other methods loading of U-Boot
26           and the Linux Kernel.  If unsure, say Y.
27
28 config SPL_SIZE_LIMIT
29         int "Maximum size of SPL image"
30         depends on SPL
31         default 69632 if ARCH_MX6
32         default 0
33         help
34           Specifies the maximum length of the U-Boot SPL image.
35           If this value is zero, it is ignored.
36
37 config SPL_SIZE_LIMIT_SUBTRACT_GD
38         bool "SPL image size check: provide space for global data"
39         depends on SPL_SIZE_LIMIT > 0
40         help
41           If enabled, aligned size of global data is reserved in
42           SPL_SIZE_LIMIT check to ensure such an image does not overflow SRAM
43           if SPL_SIZE_LIMIT describes the size of SRAM available for SPL when
44           pre-reloc global data is put into this SRAM, too.
45
46 config SPL_SIZE_LIMIT_SUBTRACT_MALLOC
47         bool "SPL image size check: provide space for malloc() pool before relocation"
48         depends on SPL_SIZE_LIMIT > 0
49         help
50           If enabled, SPL_SYS_MALLOC_F_LEN is reserved in SPL_SIZE_LIMIT check
51           to ensure such an image does not overflow SRAM if SPL_SIZE_LIMIT
52           describes the size of SRAM available for SPL when pre-reloc malloc
53           pool is put into this SRAM, too.
54
55 config SPL_SIZE_LIMIT_PROVIDE_STACK
56         hex "SPL image size check: provide stack space before relocation"
57         depends on SPL_SIZE_LIMIT > 0
58         default 0
59         help
60           If set, this size is reserved in SPL_SIZE_LIMIT check to ensure such
61           an image does not overflow SRAM if SPL_SIZE_LIMIT describes the size
62           of SRAM available for SPL when the stack required before reolcation
63           uses this SRAM, too.
64
65 config SPL_SYS_STACK_F_CHECK_BYTE
66         hex
67         default 0xaa
68         help
69           Constant used to check the stack
70
71 config SPL_SYS_REPORT_STACK_F_USAGE
72         depends on SPL_SIZE_LIMIT_PROVIDE_STACK != 0
73         bool "Check and report stack usage in SPL before relocation"
74         help
75           If this option is enabled, the initial SPL stack is filled with 0xaa
76           very early, up to the size configured with
77           SPL_SIZE_LIMIT_PROVIDE_STACK.
78           Later when SPL is done using this initial stack and switches to a
79           stack in DRAM, the actually used size of this initial stack is
80           reported by examining the memory and searching for the lowest
81           occurrence of non 0xaa bytes.
82           This default implementation works for stacks growing down only.
83
84 menu "PowerPC SPL Boot options"
85         depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
86
87 config SPL_NAND_BOOT
88         bool "Load SPL from NAND flash"
89
90 config SPL_MMC_BOOT
91         bool "Load SPL from SD Card / eMMC"
92
93 config SPL_SPI_BOOT
94         bool "Load SPL from SPI flash"
95
96 config SPL_FSL_PBL
97         bool "Create SPL in Freescale PBI format"
98         help
99           Create boot binary having SPL binary in PBI format concatenated with
100           u-boot binary.
101
102 endmenu
103
104 config HANDOFF
105         bool "Pass hand-off information from SPL to U-Boot proper"
106         depends on BLOBLIST
107         help
108           It is useful to be able to pass information from SPL to U-Boot
109           proper to preserve state that is known in SPL and is needed in U-Boot.
110           Enable this to locate the handoff information in U-Boot proper, early
111           in boot. It is available in gd->handoff. The state state is set up
112           in SPL (or TPL if that is being used).
113
114 if SPL
115
116 config SPL_HANDOFF
117         bool "Pass hand-off information from SPL to U-Boot proper"
118         depends on HANDOFF
119         default y
120         help
121           This option enables SPL to write handoff information. This can be
122           used to pass information like the size of SDRAM from SPL to U-Boot
123           proper. Also SPL can receive information from TPL in the same place
124           if that is enabled.
125
126 config SPL_LDSCRIPT
127         string "Linker script for the SPL stage"
128         default "arch/$(ARCH)/cpu/u-boot-spl.lds"
129         help
130           The SPL stage will usually require a different linker-script
131           (as it runs from a different memory region) than the regular
132           U-Boot stage.  Set this to the path of the linker-script to
133           be used for SPL.
134
135 config SPL_TEXT_BASE
136         hex "SPL Text Base"
137         default ISW_ENTRY_ADDR if AM43XX || AM33XX || OMAP54XX || ARCH_KEYSTONE
138         default 0x10060 if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN9I
139         default 0x20060 if MACH_SUN50I_H6
140         default 0x00060 if ARCH_SUNXI
141         default 0xfffc0000 if ARCH_ZYNQMP
142         default 0x0
143         help
144           The address in memory that SPL will be running from.
145
146 config SPL_BOARD_INIT
147         bool "Call board-specific initialization in SPL"
148         help
149           If this option is enabled, U-Boot will call the function
150           spl_board_init() from board_init_r(). This function should be
151           provided by the board.
152
153 config SPL_BOOTROM_SUPPORT
154         bool "Support returning to the BOOTROM"
155         help
156           Some platforms (e.g. the Rockchip RK3368) provide support in their
157           ROM for loading the next boot-stage after performing basic setup
158           from the SPL stage.
159
160           Enable this option, to return to the BOOTROM through the
161           BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
162           boot device list, if not implemented for a given board)
163
164 config SPL_BOOTCOUNT_LIMIT
165         bool "Support bootcount in SPL"
166         depends on SPL_ENV_SUPPORT
167         help
168           On some boards, which use 'falcon' mode, it is necessary to check
169           and increment the number of boot attempts. Such boards do not
170           use proper U-Boot for normal boot flow and hence needs those
171           adjustments to be done in the SPL.
172
173 config SPL_RAW_IMAGE_SUPPORT
174         bool "Support SPL loading and booting of RAW images"
175         default n if (ARCH_MX6 && (SPL_MMC_SUPPORT || SPL_SATA_SUPPORT))
176         default y if !TI_SECURE_DEVICE
177         help
178           SPL will support loading and booting a RAW image when this option
179           is y. If this is not set, SPL will move on to other available
180           boot media to find a suitable image.
181
182 config SPL_LEGACY_IMAGE_SUPPORT
183         bool "Support SPL loading and booting of Legacy images"
184         default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
185         help
186           SPL will support loading and booting Legacy images when this option
187           is y. If this is not set, SPL will move on to other available
188           boot media to find a suitable image.
189
190 config SPL_LEGACY_IMAGE_CRC_CHECK
191         bool "Check CRC of Legacy images"
192         depends on SPL_LEGACY_IMAGE_SUPPORT
193         select SPL_CRC32_SUPPORT
194         help
195           Enable this to check the CRC of Legacy images. While this increases
196           reliability, it affects both code size and boot duration.
197           If disabled, Legacy images are booted if the image magic and size
198           are correct, without further integrity checks.
199
200 config SPL_SYS_MALLOC_SIMPLE
201         bool
202         prompt "Only use malloc_simple functions in the SPL"
203         help
204           Say Y here to only use the *_simple malloc functions from
205           malloc_simple.c, rather then using the versions from dlmalloc.c;
206           this will make the SPL binary smaller at the cost of more heap
207           usage as the *_simple malloc functions do not re-use free-ed mem.
208
209 config TPL_SYS_MALLOC_SIMPLE
210         bool
211         prompt "Only use malloc_simple functions in the TPL"
212         depends on TPL
213         help
214           Say Y here to only use the *_simple malloc functions from
215           malloc_simple.c, rather then using the versions from dlmalloc.c;
216           this will make the TPL binary smaller at the cost of more heap
217           usage as the *_simple malloc functions do not re-use free-ed mem.
218
219 config SPL_STACK_R
220         bool "Enable SDRAM location for SPL stack"
221         help
222           SPL starts off execution in SRAM and thus typically has only a small
223           stack available. Since SPL sets up DRAM while in its board_init_f()
224           function, it is possible for the stack to move there before
225           board_init_r() is reached. This option enables a special SDRAM
226           location for the SPL stack. U-Boot SPL switches to this after
227           board_init_f() completes, and before board_init_r() starts.
228
229 config SPL_STACK_R_ADDR
230         depends on SPL_STACK_R
231         hex "SDRAM location for SPL stack"
232         default 0x82000000 if ARCH_OMAP2PLUS
233         help
234           Specify the address in SDRAM for the SPL stack. This will be set up
235           before board_init_r() is called.
236
237 config SPL_STACK_R_MALLOC_SIMPLE_LEN
238         depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
239         hex "Size of malloc_simple heap after switching to DRAM SPL stack"
240         default 0x100000
241         help
242           Specify the amount of the stack to use as memory pool for
243           malloc_simple after switching the stack to DRAM. This may be set
244           to give board_init_r() a larger heap then the initial heap in
245           SRAM which is limited to SYS_MALLOC_F_LEN bytes.
246
247 config SPL_SEPARATE_BSS
248         bool "BSS section is in a different memory region from text"
249         help
250           Some platforms need a large BSS region in SPL and can provide this
251           because RAM is already set up. In this case BSS can be moved to RAM.
252           This option should then be enabled so that the correct device tree
253           location is used. Normally we put the device tree at the end of BSS
254           but with this option enabled, it goes at _image_binary_end.
255
256 config SPL_BANNER_PRINT
257         bool "Enable output of the SPL banner 'U-Boot SPL ...'"
258         default y
259         help
260           If this option is enabled, SPL will print the banner with version
261           info. Disabling this option could be useful to reduce TPL boot time
262           (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
263
264 config TPL_BANNER_PRINT
265         bool "Enable output of the TPL banner 'U-Boot TPL ...'"
266         depends on TPL
267         default y
268         help
269           If this option is enabled, SPL will not print the banner with version
270           info. Disabling this option could be useful to reduce SPL boot time
271           (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
272
273 config SPL_EARLY_BSS
274         depends on ARM && !ARM64
275         bool "Allows initializing BSS early before entering board_init_f"
276         help
277           On some platform we have sufficient memory available early on to
278           allow setting up and using a basic BSS prior to entering
279           board_init_f. Activating this option will also de-activate the
280           clearing of BSS during the SPL relocation process, thus allowing
281           to carry state from board_init_f to board_init_r by way of BSS.
282
283 config SPL_DISPLAY_PRINT
284         bool "Display a board-specific message in SPL"
285         help
286           If this option is enabled, U-Boot will call the function
287           spl_display_print() immediately after displaying the SPL console
288           banner ("U-Boot SPL ..."). This function should be provided by
289           the board.
290
291 config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
292         bool "MMC raw mode: by sector"
293         default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
294                      ARCH_MX6 || ARCH_MX7 || \
295                      ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
296                      ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
297                      OMAP44XX || OMAP54XX || AM33XX || AM43XX
298         help
299           Use sector number for specifying U-Boot location on MMC/SD in
300           raw mode.
301
302 config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
303         hex "Address on the MMC to load U-Boot from"
304         depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
305         default 0x50 if ARCH_SUNXI
306         default 0x75 if ARCH_DAVINCI
307         default 0x8a if ARCH_MX6 || ARCH_MX7
308         default 0x100 if ARCH_UNIPHIER
309         default 0x140 if ARCH_MVEBU
310         default 0x200 if ARCH_SOCFPGA || ARCH_AT91
311         default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
312                          OMAP54XX || AM33XX || AM43XX || ARCH_K3
313         default 0x4000 if ARCH_ROCKCHIP
314         help
315           Address on the MMC to load U-Boot from, when the MMC is being used
316           in raw mode. Units: MMC sectors (1 sector = 512 bytes).
317
318 config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
319         bool "MMC Raw mode: by partition"
320         help
321           Use a partition for loading U-Boot when using MMC/SD in raw mode.
322
323 config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
324         hex "Partition to use to load U-Boot from"
325         depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
326         default 1
327         help
328           Partition on the MMC to load U-Boot from when the MMC is being
329           used in raw mode
330
331 config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
332         bool "MMC raw mode: by partition type"
333         depends on DOS_PARTITION && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
334         help
335           Use partition type for specifying U-Boot partition on MMC/SD in
336           raw mode. U-Boot will be loaded from the first partition of this
337           type to be found.
338
339 config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
340         hex "Partition Type on the MMC to load U-Boot from"
341         depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
342         help
343           Partition Type on the MMC to load U-Boot from, when the MMC is being
344           used in raw mode.
345
346 config SPL_CRC32_SUPPORT
347         bool "Support CRC32"
348         default y if SPL_LEGACY_IMAGE_SUPPORT
349         help
350           Enable this to support CRC32 in uImages or FIT images within SPL.
351           This is a 32-bit checksum value that can be used to verify images.
352           For FIT images, this is the least secure type of checksum, suitable
353           for detected accidental image corruption. For secure applications you
354           should consider SHA1 or SHA256.
355
356 config SPL_MD5_SUPPORT
357         bool "Support MD5"
358         depends on SPL_FIT
359         help
360           Enable this to support MD5 in FIT images within SPL. An MD5
361           checksum is a 128-bit hash value used to check that the image
362           contents have not been corrupted. Note that MD5 is not considered
363           secure as it is possible (with a brute-force attack) to adjust the
364           image while still retaining the same MD5 hash value. For secure
365           applications where images may be changed maliciously, you should
366           consider SHA1 or SHA256.
367
368 config SPL_SHA1_SUPPORT
369         bool "Support SHA1"
370         depends on SPL_FIT
371         select SHA1
372         help
373           Enable this to support SHA1 in FIT images within SPL. A SHA1
374           checksum is a 160-bit (20-byte) hash value used to check that the
375           image contents have not been corrupted or maliciously altered.
376           While SHA1 is fairly secure it is coming to the end of its life
377           due to the expanding computing power available to brute-force
378           attacks. For more security, consider SHA256.
379
380 config SPL_SHA256_SUPPORT
381         bool "Support SHA256"
382         depends on SPL_FIT
383         select SHA256
384         help
385           Enable this to support SHA256 in FIT images within SPL. A SHA256
386           checksum is a 256-bit (32-byte) hash value used to check that the
387           image contents have not been corrupted. SHA256 is recommended for
388           use in secure applications since (as at 2016) there is no known
389           feasible attack that could produce a 'collision' with differing
390           input data. Use this for the highest security. Note that only the
391           SHA256 variant is supported: SHA512 and others are not currently
392           supported in U-Boot.
393
394 config SPL_FIT_IMAGE_TINY
395         bool "Remove functionality from SPL FIT loading to reduce size"
396         depends on SPL_FIT
397         default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
398         default y if ARCH_IMX8M
399         help
400           Enable this to reduce the size of the FIT image loading code
401           in SPL, if space for the SPL binary is very tight.
402
403           This removes the detection of image types (which forces the
404           first image to be treated as having a U-Boot style calling
405           convention) and skips the recording of each loaded payload
406           (i.e. loadable) into the FDT (modifying the loaded FDT to
407           ensure this information is available to the next image
408           invoked).
409
410 config SPL_CPU_SUPPORT
411         bool "Support CPU drivers"
412         help
413           Enable this to support CPU drivers in SPL. These drivers can set
414           up CPUs and provide information about them such as the model and
415           name. This can be useful in SPL since setting up the CPUs earlier
416           may improve boot performance. Enable this option to build the
417           drivers in drivers/cpu as part of an SPL build.
418
419 config SPL_CRYPTO_SUPPORT
420         bool "Support crypto drivers"
421         help
422           Enable crypto drivers in SPL. These drivers can be used to
423           accelerate secure boot processing in secure applications. Enable
424           this option to build the drivers in drivers/crypto as part of an
425           SPL build.
426
427 config SPL_HASH_SUPPORT
428         bool "Support hashing drivers"
429         select SHA1
430         select SHA256
431         help
432           Enable hashing drivers in SPL. These drivers can be used to
433           accelerate secure boot processing in secure applications. Enable
434           this option to build system-specific drivers for hash acceleration
435           as part of an SPL build.
436
437 config TPL_HASH_SUPPORT
438         bool "Support hashing drivers in TPL"
439         depends on TPL
440         select SHA1
441         select SHA256
442         help
443           Enable hashing drivers in SPL. These drivers can be used to
444           accelerate secure boot processing in secure applications. Enable
445           this option to build system-specific drivers for hash acceleration
446           as part of an SPL build.
447
448 config SPL_DMA_SUPPORT
449         bool "Support DMA drivers"
450         help
451           Enable DMA (direct-memory-access) drivers in SPL. These drivers
452           can be used to handle memory-to-peripheral data transfer without
453           the CPU moving the data. Enable this option to build the drivers
454           in drivers/dma as part of an SPL build.
455
456 config SPL_DRIVERS_MISC_SUPPORT
457         bool "Support misc drivers"
458         help
459           Enable miscellaneous drivers in SPL. These drivers perform various
460           tasks that don't fall nicely into other categories, Enable this
461           option to build the drivers in drivers/misc as part of an SPL
462           build, for those that support building in SPL (not all drivers do).
463
464 config SPL_ENV_SUPPORT
465         bool "Support an environment"
466         help
467           Enable environment support in SPL. The U-Boot environment provides
468           a number of settings (essentially name/value pairs) which can
469           control many aspects of U-Boot's operation. Normally this is not
470           needed in SPL as it has a much simpler task with less
471           configuration. But some boards use this to support 'Falcon' boot
472           on EXT2 and FAT, where SPL boots directly into Linux without
473           starting U-Boot first. Enabling this option will make env_get()
474           and env_set() available in SPL.
475
476 config SPL_SAVEENV
477         bool "Support save environment"
478         depends on SPL_ENV_SUPPORT
479         select SPL_MMC_WRITE if ENV_IS_IN_MMC
480         help
481           Enable save environment support in SPL after setenv. By default
482           the saveenv option is not provided in SPL, but some boards need
483           this support in 'Falcon' boot, where SPL need to boot from
484           different images based on environment variable set by OS. For
485           example OS may set "reboot_image" environment variable to
486           "recovery" inorder to boot recovery image by SPL. The SPL read
487           "reboot_image" and act accordingly and change the reboot_image
488           to default mode using setenv and save the environment.
489
490 config SPL_ETH_SUPPORT
491         bool "Support Ethernet"
492         depends on SPL_ENV_SUPPORT
493         help
494           Enable access to the network subsystem and associated Ethernet
495           drivers in SPL. This permits SPL to load U-Boot over an Ethernet
496           link rather than from an on-board peripheral. Environment support
497           is required since the network stack uses a number of environment
498           variables. See also SPL_NET_SUPPORT.
499
500 config SPL_FS_EXT4
501         bool "Support EXT filesystems"
502         help
503           Enable support for EXT2/3/4 filesystems with SPL. This permits
504           U-Boot (or Linux in Falcon mode) to be loaded from an EXT
505           filesystem from within SPL. Support for the underlying block
506           device (e.g. MMC or USB) must be enabled separately.
507
508 config SPL_FS_FAT
509         bool "Support FAT filesystems"
510         select FS_FAT
511         help
512           Enable support for FAT and VFAT filesystems with SPL. This
513           permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
514           filesystem from within SPL. Support for the underlying block
515           device (e.g. MMC or USB) must be enabled separately.
516
517 config SPL_FAT_WRITE
518         bool "Support write for FAT filesystems"
519         help
520           Enable write support for FAT and VFAT filesystems with SPL.
521           Support for the underlying block device (e.g. MMC or USB) must be
522           enabled separately.
523
524 config SPL_FPGA_SUPPORT
525         bool "Support FPGAs"
526         help
527           Enable support for FPGAs in SPL. Field-programmable Gate Arrays
528           provide software-configurable hardware which is typically used to
529           implement peripherals (such as UARTs, LCD displays, MMC) or
530           accelerate custom processing functions, such as image processing
531           or machine learning. Sometimes it is useful to program the FPGA
532           as early as possible during boot, and this option can enable that
533           within SPL.
534
535 config SPL_GPIO_SUPPORT
536         bool "Support GPIO in SPL"
537         help
538           Enable support for GPIOs (General-purpose Input/Output) in SPL.
539           GPIOs allow U-Boot to read the state of an input line (high or
540           low) and set the state of an output line. This can be used to
541           drive LEDs, control power to various system parts and read user
542           input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED,
543           for example. Enable this option to build the drivers in
544           drivers/gpio as part of an SPL build.
545
546 config SPL_I2C_SUPPORT
547         bool "Support I2C"
548         help
549           Enable support for the I2C (Inter-Integrated Circuit) bus in SPL.
550           I2C works with a clock and data line which can be driven by a
551           one or more masters or slaves. It is a fairly complex bus but is
552           widely used as it only needs two lines for communication. Speeds of
553           400kbps are typical but up to 3.4Mbps is supported by some
554           hardware. I2C can be useful in SPL to configure power management
555           ICs (PMICs) before raising the CPU clock speed, for example.
556           Enable this option to build the drivers in drivers/i2c as part of
557           an SPL build.
558
559 config SPL_LIBCOMMON_SUPPORT
560         bool "Support common libraries"
561         help
562           Enable support for common U-Boot libraries within SPL. These
563           libraries include common code to deal with U-Boot images,
564           environment and USB, for example. This option is enabled on many
565           boards. Enable this option to build the code in common/ as part of
566           an SPL build.
567
568 config SPL_LIBDISK_SUPPORT
569         bool "Support disk partitions"
570         select PARTITIONS
571         help
572           Enable support for disk partitions within SPL. 'Disk' is something
573           of a misnomer as it includes non-spinning media such as flash (as
574           used in MMC and USB sticks). Partitions provide a way for a disk
575           to be split up into separate regions, with a partition table placed
576           at the start or end which describes the location and size of each
577           'partition'. These partitions are typically uses as individual block
578           devices, typically with an EXT2 or FAT filesystem in each. This
579           option enables whatever partition support has been enabled in
580           U-Boot to also be used in SPL. It brings in the code in disk/.
581
582 config SPL_LIBGENERIC_SUPPORT
583         bool "Support generic libraries"
584         help
585           Enable support for generic U-Boot libraries within SPL. These
586           libraries include generic code to deal with device tree, hashing,
587           printf(), compression and the like. This option is enabled on many
588           boards. Enable this option to build the code in lib/ as part of an
589           SPL build.
590
591 config SPL_DM_MAILBOX
592         bool "Support Mailbox"
593         help
594           Enable support for Mailbox within SPL. This enable the inter
595           processor communication protocols tobe used within SPL. Enable
596           this option to build the drivers in drivers/mailbox as part of
597           SPL build.
598
599 config SPL_MMC_SUPPORT
600         bool "Support MMC"
601         depends on MMC
602         select HAVE_BLOCK_DEVICE
603         help
604           Enable support for MMC (Multimedia Card) within SPL. This enables
605           the MMC protocol implementation and allows any enabled drivers to
606           be used within SPL. MMC can be used with or without disk partition
607           support depending on the application (SPL_LIBDISK_SUPPORT). Enable
608           this option to build the drivers in drivers/mmc as part of an SPL
609           build.
610
611 config SPL_MMC_TINY
612         bool "Tiny MMC framework in SPL"
613         depends on SPL_MMC_SUPPORT
614         default n
615         help
616           Enable MMC framework tinification support. This option is useful if
617           if your SPL is extremely size constrained. Heed the warning, enable
618           this option if and only if you know exactly what you are doing, if
619           you are reading this help text, you most likely have no idea :-)
620
621           The MMC framework is reduced to bare minimum to be useful. No malloc
622           support is needed for the MMC framework operation with this option
623           enabled. The framework supports exactly one MMC device and exactly
624           one MMC driver. The MMC driver can be adjusted to avoid any malloc
625           operations too, which can remove the need for malloc support in SPL
626           and thus further reduce footprint.
627
628 config SPL_MMC_WRITE
629         bool "MMC/SD/SDIO card support for write operations in SPL"
630         depends on SPL_MMC_SUPPORT
631         default n
632         help
633           Enable write access to MMC and SD Cards in SPL
634
635
636 config SPL_MPC8XXX_INIT_DDR_SUPPORT
637         bool "Support MPC8XXX DDR init"
638         help
639           Enable support for DDR-SDRAM (double-data-rate synchronous dynamic
640           random-access memory) on the MPC8XXX family within SPL. This
641           allows DRAM to be set up before loading U-Boot into that DRAM,
642           where it can run.
643
644 config SPL_MTD_SUPPORT
645         bool "Support MTD drivers"
646         help
647           Enable support for MTD (Memory Technology Device) within SPL. MTD
648           provides a block interface over raw NAND and can also be used with
649           SPI flash. This allows SPL to load U-Boot from supported MTD
650           devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how
651           to enable specific MTD drivers.
652
653 config SPL_MUSB_NEW_SUPPORT
654         bool "Support new Mentor Graphics USB"
655         help
656           Enable support for Mentor Graphics USB in SPL. This is a new
657           driver used by some boards. Enable this option to build
658           the drivers in drivers/usb/musb-new as part of an SPL build. The
659           old drivers are in drivers/usb/musb.
660
661 config SPL_NAND_SUPPORT
662         bool "Support NAND flash"
663         help
664           Enable support for NAND (Negative AND) flash in SPL. NAND flash
665           can be used to allow SPL to load U-Boot from supported devices.
666           This enables the drivers in drivers/mtd/nand/raw as part of an SPL
667           build.
668
669 config SPL_UBI
670         bool "Support UBI"
671         help
672           Enable support for loading payloads from UBI. See
673           README.ubispl for more info.
674
675 if SPL_UBI
676 config SPL_UBI_LOAD_BY_VOLNAME
677         bool "Support loading volumes by name"
678         help
679           This enables support for loading UBI volumes by name. When this
680           is set, CONFIG_SPL_UBI_LOAD_MONITOR_VOLNAME can be used to
681           configure the volume name from which to load U-Boot.
682
683 config SPL_UBI_MAX_VOL_LEBS
684         int "Maximum number of LEBs per volume"
685         depends on SPL_UBI
686         help
687           The maximum number of logical eraseblocks which a static volume
688           to load can contain. Used for sizing the scan data structure.
689
690 config SPL_UBI_MAX_PEB_SIZE
691         int "Maximum PEB size"
692         depends on SPL_UBI
693         help
694           The maximum physical erase block size.
695
696 config SPL_UBI_MAX_PEBS
697         int "Maximum number of PEBs"
698         depends on SPL_UBI
699         help
700           The maximum physical erase block size. If not overridden by
701           board code, this value will be used as the actual number of PEBs.
702
703 config SPL_UBI_PEB_OFFSET
704         int "Offset to first UBI PEB"
705         depends on SPL_UBI
706         help
707           The offset in number of PEBs from the start of flash to the first
708           PEB part of the UBI image.
709
710 config SPL_UBI_VID_OFFSET
711         int "Offset to VID header"
712         depends on SPL_UBI
713
714 config SPL_UBI_LEB_START
715         int "Offset to LEB in PEB"
716         depends on SPL_UBI
717         help
718           The offset in bytes to the LEB within a PEB.
719
720 config SPL_UBI_INFO_ADDR
721         hex "Address to place UBI scan info"
722         depends on SPL_UBI
723         help
724           Address for ubispl to place the scan info. Read README.ubispl to
725           determine the required size
726
727 config SPL_UBI_VOL_IDS
728         int "Maximum volume id"
729         depends on SPL_UBI
730         help
731           The maximum volume id which can be loaded. Used for sizing the
732           scan data structure.
733
734 config SPL_UBI_LOAD_MONITOR_ID
735         int "id of U-Boot volume"
736         depends on SPL_UBI
737         help
738           The UBI volume id from which to load U-Boot
739
740 config SPL_UBI_LOAD_MONITOR_VOLNAME
741         string "volume name of U-Boot volume"
742         depends on SPL_UBI_LOAD_BY_VOLNAME
743         help
744           The UBI volume name from which to load U-Boot
745
746 config SPL_UBI_LOAD_KERNEL_ID
747         int "id of kernel volume"
748         depends on SPL_OS_BOOT && SPL_UBI
749         help
750           The UBI volume id from which to load the kernel
751
752 config SPL_UBI_LOAD_ARGS_ID
753         int "id of kernel args volume"
754         depends on SPL_OS_BOOT && SPL_UBI
755         help
756           The UBI volume id from which to load the device tree
757
758 config UBI_SPL_SILENCE_MSG
759         bool "silence UBI SPL messages"
760         default n
761         help
762           Disable messages from UBI SPL. This leaves warnings
763           and errors enabled.
764
765 endif   # if SPL_UBI
766
767 config SPL_NET_SUPPORT
768         bool "Support networking"
769         help
770           Enable support for network devices (such as Ethernet) in SPL.
771           This permits SPL to load U-Boot over a network link rather than
772           from an on-board peripheral. Environment support is required since
773           the network stack uses a number of environment variables. See also
774           SPL_ETH_SUPPORT.
775
776 if SPL_NET_SUPPORT
777 config SPL_NET_VCI_STRING
778         string "BOOTP Vendor Class Identifier string sent by SPL"
779         help
780           As defined by RFC 2132 the vendor class identifier field can be
781           sent by the client to identify the vendor type and configuration
782           of a client.  This is often used in practice to allow for the DHCP
783           server to specify different files to load depending on if the ROM,
784           SPL or U-Boot itself makes the request
785 endif   # if SPL_NET_SUPPORT
786
787 config SPL_NO_CPU_SUPPORT
788         bool "Drop CPU code in SPL"
789         help
790           This is specific to the ARM926EJ-S CPU. It disables the standard
791           start.S start-up code, presumably so that a replacement can be
792           used on that CPU. You should not enable it unless you know what
793           you are doing.
794
795 config SPL_NOR_SUPPORT
796         bool "Support NOR flash"
797         help
798           Enable support for loading U-Boot from memory-mapped NOR (Negative
799           OR) flash in SPL. NOR flash is slow to write but fast to read, and
800           a memory-mapped device makes it very easy to access. Loading from
801           NOR is typically achieved with just a memcpy().
802
803 config SPL_XIP_SUPPORT
804         bool "Support XIP"
805         depends on SPL
806         help
807           Enable support for execute in place of U-Boot or kernel image. There
808           is no need to copy image from flash to ram if flash supports execute
809           in place. Its very useful in systems having enough flash but not
810           enough ram to load the image.
811
812 config SPL_ONENAND_SUPPORT
813         bool "Support OneNAND flash"
814         help
815           Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
816           a type of NAND flash and therefore can be used to allow SPL to
817           load U-Boot from supported devices. This enables the drivers in
818           drivers/mtd/onenand as part of an SPL build.
819
820 config SPL_OS_BOOT
821         bool "Activate Falcon Mode"
822         depends on !TI_SECURE_DEVICE
823         default n
824         help
825           Enable booting directly to an OS from SPL.
826           for more info read doc/README.falcon
827
828 if SPL_OS_BOOT
829 config SYS_OS_BASE
830         hex "addr, where OS is found"
831         depends on SPL_NOR_SUPPORT
832         help
833           Specify the address, where the OS image is found, which
834           gets booted.
835
836 endif # SPL_OS_BOOT
837
838 config SPL_PAYLOAD
839         string "SPL payload"
840         default "tpl/u-boot-with-tpl.bin" if TPL
841         default "u-boot.bin"
842         help
843           Payload for SPL boot. For backward compatibility, default to
844           u-boot.bin, i.e. RAW image without any header. In case of
845           TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
846           use u-boot.img.
847
848 config SPL_PCI
849         bool "Support PCI drivers"
850         help
851           Enable support for PCI in SPL. For platforms that need PCI to boot,
852           or must perform some init using PCI in SPL, this provides the
853           necessary driver support. This enables the drivers in drivers/pci
854           as part of an SPL build.
855
856 config SPL_PCH_SUPPORT
857         bool "Support PCH drivers"
858         help
859           Enable support for PCH (Platform Controller Hub) devices in SPL.
860           These are used to set up GPIOs and the SPI peripheral early in
861           boot. This enables the drivers in drivers/pch as part of an SPL
862           build.
863
864 config SPL_POST_MEM_SUPPORT
865         bool "Support POST drivers"
866         help
867           Enable support for POST (Power-on Self Test) in SPL. POST is a
868           procedure that checks that the hardware (CPU or board) appears to
869           be functionally correctly. It is a sanity check that can be
870           performed before booting. This enables the drivers in post/drivers
871           as part of an SPL build.
872
873 config SPL_DM_RESET
874         bool "Support reset drivers"
875         depends on SPL
876         help
877           Enable support for reset control in SPL.
878           That can be useful in SPL to handle IP reset in driver, as in U-Boot,
879           by using the generic reset API provided by driver model.
880           This enables the drivers in drivers/reset as part of an SPL build.
881
882 config SPL_POWER_SUPPORT
883         bool "Support power drivers"
884         help
885           Enable support for power control in SPL. This includes support
886           for PMICs (Power-management Integrated Circuits) and some of the
887           features provided by PMICs. In particular, voltage regulators can
888           be used to enable/disable power and vary its voltage. That can be
889           useful in SPL to turn on boot peripherals and adjust CPU voltage
890           so that the clock speed can be increased. This enables the drivers
891           in drivers/power, drivers/power/pmic and drivers/power/regulator
892           as part of an SPL build.
893
894 config SPL_POWER_DOMAIN
895         bool "Support power domain drivers"
896         help
897           Enable support for power domain control in SPL. Many SoCs allow
898           power to be applied to or removed from portions of the SoC (power
899           domains). This may be used to save power. This API provides the
900           means to control such power management hardware. This enables
901           the drivers in drivers/power/domain as part of a SPL build.
902
903 config SPL_RAM_SUPPORT
904         bool "Support booting from RAM"
905         default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
906         help
907           Enable booting of an image in RAM. The image can be preloaded or
908           it can be loaded by SPL directly into RAM (e.g. using USB).
909
910 config SPL_RAM_DEVICE
911         bool "Support booting from preloaded image in RAM"
912         depends on SPL_RAM_SUPPORT
913         default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
914         help
915           Enable booting of an image already loaded in RAM. The image has to
916           be already in memory when SPL takes over, e.g. loaded by the boot
917           ROM.
918
919 config SPL_REMOTEPROC
920         bool "Support REMOTEPROCS"
921         help
922           Enable support for REMOTEPROCs in SPL. This permits to load
923           a remote processor firmware in SPL.
924
925 config SPL_RTC_SUPPORT
926         bool "Support RTC drivers"
927         help
928           Enable RTC (Real-time Clock) support in SPL. This includes support
929           for reading and setting the time. Some RTC devices also have some
930           non-volatile (battery-backed) memory which is accessible if
931           needed. This enables the drivers in drivers/rtc as part of an SPL
932           build.
933
934 config SPL_SATA_SUPPORT
935         bool "Support loading from SATA"
936         help
937           Enable support for SATA (Serial AT attachment) in SPL. This allows
938           use of SATA devices such as hard drives and flash drivers for
939           loading U-Boot. SATA is used in higher-end embedded systems and
940           can provide higher performance than MMC , at somewhat higher
941           expense and power consumption. This enables loading from SATA
942           using a configured device.
943
944 config SPL_SATA_RAW_U_BOOT_USE_SECTOR
945         bool "SATA raw mode: by sector"
946         depends on SPL_SATA_SUPPORT
947         help
948           Use sector number for specifying U-Boot location on SATA disk in
949           raw mode.
950
951 config SPL_SATA_RAW_U_BOOT_SECTOR
952         hex "Sector on the SATA disk to load U-Boot from"
953         depends on SPL_SATA_RAW_U_BOOT_USE_SECTOR
954         help
955           Sector on the SATA disk to load U-Boot from, when the SATA disk is being
956           used in raw mode. Units: SATA disk sectors (1 sector = 512 bytes).
957
958 config SPL_SERIAL_SUPPORT
959         bool "Support serial"
960         select SPL_PRINTF
961         select SPL_STRTO
962         help
963           Enable support for serial in SPL. This allows use of a serial UART
964           for displaying messages while SPL is running. It also brings in
965           printf() and panic() functions. This should normally be enabled
966           unless there are space reasons not to. Even then, consider
967           enabling USE_TINY_PRINTF which is a small printf() version.
968
969 config SPL_SPI_FLASH_SUPPORT
970         bool "Support SPI flash drivers"
971         help
972           Enable support for using SPI flash in SPL, and loading U-Boot from
973           SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
974           the SPI bus that is used to connect it to a system. It is a simple
975           but fast bidirectional 4-wire bus (clock, chip select and two data
976           lines). This enables the drivers in drivers/mtd/spi as part of an
977           SPL build. This normally requires SPL_SPI_SUPPORT.
978
979 if SPL_SPI_FLASH_SUPPORT
980
981 config SPL_SPI_FLASH_TINY
982         bool "Enable low footprint SPL SPI Flash support"
983         depends on !SPI_FLASH_BAR
984         default y if SPI_FLASH
985         help
986          Enable lightweight SPL SPI Flash support that supports just reading
987          data/images from flash. No support to write/erase flash. Enable
988          this if you have SPL size limitations and don't need full
989          fledged SPI flash support.
990
991 config SPL_SPI_FLASH_SFDP_SUPPORT
992         bool "SFDP table parsing support for SPI NOR flashes"
993         depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
994         help
995          Enable support for parsing and auto discovery of parameters for
996          SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
997          tables as per JESD216 standard in SPL.
998
999 config SPL_SPI_LOAD
1000         bool "Support loading from SPI flash"
1001         help
1002           Enable support for loading next stage, U-Boot or otherwise, from
1003           SPI NOR in U-Boot SPL.
1004
1005 endif # SPL_SPI_FLASH_SUPPORT
1006
1007 config SYS_SPI_U_BOOT_OFFS
1008         hex "address of u-boot payload in SPI flash"
1009         default 0x0
1010         depends on SPL_SPI_LOAD || SPL_SPI_SUNXI
1011         help
1012          Address within SPI-Flash from where the u-boot payload is fetched
1013          from.
1014
1015 config SPL_SPI_SUPPORT
1016         bool "Support SPI drivers"
1017         help
1018           Enable support for using SPI in SPL. This is used for connecting
1019           to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
1020           more details on that. The SPI driver provides the transport for
1021           data between the SPI flash and the CPU. This option can be used to
1022           enable SPI drivers that are needed for other purposes also, such
1023           as a SPI PMIC.
1024
1025 config SPL_THERMAL
1026         bool "Driver support for thermal devices"
1027         help
1028           Enable support for temperature-sensing devices. Some SoCs have on-chip
1029           temperature sensors to permit warnings, speed throttling or even
1030           automatic power-off when the temperature gets too high or low. Other
1031           devices may be discrete but connected on a suitable bus.
1032
1033 config SPL_USB_HOST_SUPPORT
1034         bool "Support USB host drivers"
1035         select HAVE_BLOCK_DEVICE
1036         help
1037           Enable access to USB (Universal Serial Bus) host devices so that
1038           SPL can load U-Boot from a connected USB peripheral, such as a USB
1039           flash stick. While USB takes a little longer to start up than most
1040           buses, it is very flexible since many different types of storage
1041           device can be attached. This option enables the drivers in
1042           drivers/usb/host as part of an SPL build.
1043
1044 config SPL_USB_STORAGE
1045         bool "Support loading from USB"
1046         depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB)
1047         help
1048           Enable support for USB devices in SPL. This allows use of USB
1049           devices such as hard drives and flash drivers for loading U-Boot.
1050           The actual drivers are enabled separately using the normal U-Boot
1051           config options. This enables loading from USB using a configured
1052           device.
1053
1054 config SPL_USB_GADGET
1055         bool "Suppport USB Gadget drivers"
1056         help
1057           Enable USB Gadget API which allows to enable USB device functions
1058           in SPL.
1059
1060 if SPL_USB_GADGET
1061
1062 config SPL_USB_ETHER
1063         bool "Support USB Ethernet drivers"
1064         help
1065           Enable access to the USB network subsystem and associated
1066           drivers in SPL. This permits SPL to load U-Boot over a
1067           USB-connected Ethernet link (such as a USB Ethernet dongle) rather
1068           than from an onboard peripheral. Environment support is required
1069           since the network stack uses a number of environment variables.
1070           See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.
1071
1072 config SPL_DFU
1073         bool "Support DFU (Device Firmware Upgrade)"
1074         select SPL_HASH_SUPPORT
1075         select SPL_DFU_NO_RESET
1076         depends on SPL_RAM_SUPPORT
1077         help
1078           This feature enables the DFU (Device Firmware Upgrade) in SPL with
1079           RAM memory device support. The ROM code will load and execute
1080           the SPL built with dfu. The user can load binaries (u-boot/kernel) to
1081           selected device partition from host-pc using dfu-utils.
1082           This feature is useful to flash the binaries to factory or bare-metal
1083           boards using USB interface.
1084
1085 choice
1086         bool "DFU device selection"
1087         depends on SPL_DFU
1088
1089 config SPL_DFU_RAM
1090         bool "RAM device"
1091         depends on SPL_DFU && SPL_RAM_SUPPORT
1092         help
1093          select RAM/DDR memory device for loading binary images
1094          (u-boot/kernel) to the selected device partition using
1095          DFU and execute the u-boot/kernel from RAM.
1096
1097 endchoice
1098
1099 config SPL_USB_SDP_SUPPORT
1100         bool "Support SDP (Serial Download Protocol)"
1101         help
1102           Enable Serial Download Protocol (SDP) device support in SPL. This
1103           allows to download images into memory and execute (jump to) them
1104           using the same protocol as implemented by the i.MX family's boot ROM.
1105 endif
1106
1107 config SPL_WATCHDOG_SUPPORT
1108         bool "Support watchdog drivers"
1109         imply SPL_WDT if !HW_WATCHDOG
1110         help
1111           Enable support for watchdog drivers in SPL. A watchdog is
1112           typically a hardware peripheral which can reset the system when it
1113           detects no activity for a while (such as a software crash). This
1114           enables the drivers in drivers/watchdog as part of an SPL build.
1115
1116 config SPL_YMODEM_SUPPORT
1117         bool "Support loading using Ymodem"
1118         depends on SPL_SERIAL_SUPPORT
1119         help
1120           While loading from serial is slow it can be a useful backup when
1121           there is no other option. The Ymodem protocol provides a reliable
1122           means of transmitting U-Boot over a serial line for using in SPL,
1123           with a checksum to ensure correctness.
1124
1125 config SPL_ATF
1126         bool "Support ARM Trusted Firmware"
1127         depends on ARM64
1128         help
1129           ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
1130           is loaded by SPL (which is considered as BL2 in ATF terminology).
1131           More detail at: https://github.com/ARM-software/arm-trusted-firmware
1132
1133 config SPL_ATF_NO_PLATFORM_PARAM
1134         bool "Pass no platform parameter"
1135         depends on SPL_ATF
1136         help
1137           While we expect to call a pointer to a valid FDT (or NULL)
1138           as the platform parameter to an ATF, some ATF versions are
1139           not U-Boot aware and have an insufficiently robust parameter
1140           validation to gracefully reject a FDT being passed.
1141
1142           If this option is enabled, the spl_atf os-type handler will
1143           always pass NULL for the platform parameter.
1144
1145           If your ATF is affected, say Y.
1146
1147 config SPL_AM33XX_ENABLE_RTC32K_OSC
1148         bool "Enable the RTC32K OSC on AM33xx based platforms"
1149         default y if AM33XX
1150         help
1151           Enable access to the AM33xx RTC and select the external 32kHz clock
1152           source.
1153
1154 config SPL_OPTEE
1155         bool "Support OP-TEE Trusted OS"
1156         depends on ARM
1157         help
1158           OP-TEE is an open source Trusted OS  which is loaded by SPL.
1159           More detail at: https://github.com/OP-TEE/optee_os
1160
1161 config SPL_OPENSBI
1162         bool "Support RISC-V OpenSBI"
1163         depends on RISCV && SPL_RISCV_MMODE && RISCV_SMODE
1164         help
1165           OpenSBI is an open-source implementation of the RISC-V Supervisor Binary
1166           Interface (SBI) specification. U-Boot supports the OpenSBI FW_DYNAMIC
1167           firmware. It is loaded and started by U-Boot SPL.
1168
1169           More details are available at https://github.com/riscv/opensbi and
1170           https://github.com/riscv/riscv-sbi-doc
1171
1172 config SPL_OPENSBI_LOAD_ADDR
1173         hex "OpenSBI load address"
1174         depends on SPL_OPENSBI
1175         help
1176           Load address of the OpenSBI binary.
1177
1178 config TPL
1179         bool
1180         depends on SUPPORT_TPL
1181         prompt "Enable TPL"
1182         help
1183           If you want to build TPL as well as the normal image and SPL, say Y.
1184
1185 if TPL
1186
1187 config TPL_HANDOFF
1188         bool "Pass hand-off information from TPL to SPL and U-Boot proper"
1189         depends on HANDOFF
1190         default y
1191         help
1192           This option enables TPL to write handoff information. This can be
1193           used to pass information like the size of SDRAM from TPL to U-Boot
1194           proper. The information is also available to SPL if it is useful
1195           there.
1196
1197 config TPL_BOARD_INIT
1198         bool "Call board-specific initialization in TPL"
1199         help
1200           If this option is enabled, U-Boot will call the function
1201           spl_board_init() from board_init_r(). This function should be
1202           provided by the board.
1203
1204 config TPL_LDSCRIPT
1205         string "Linker script for the TPL stage"
1206         depends on TPL
1207         default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
1208         default "arch/$(ARCH)/cpu/u-boot-spl.lds"
1209         help
1210           The TPL stage will usually require a different linker-script
1211           (as it runs from a different memory region) than the regular
1212           U-Boot stage.  Set this to the path of the linker-script to
1213           be used for TPL.
1214
1215           May be left empty to trigger the Makefile infrastructure to
1216           fall back to the linker-script used for the SPL stage.
1217
1218 config TPL_NEEDS_SEPARATE_TEXT_BASE
1219         bool "TPL needs a separate text-base"
1220         default n
1221         depends on TPL
1222         help
1223           Enable, if the TPL stage should not inherit its text-base
1224           from the SPL stage.  When enabled, a base address for the
1225           .text sections of the TPL stage has to be set below.
1226
1227 config TPL_NEEDS_SEPARATE_STACK
1228         bool "TPL needs a separate initial stack-pointer"
1229         default n
1230         depends on TPL
1231         help
1232           Enable, if the TPL stage should not inherit its initial
1233           stack-pointer from the settings for the SPL stage.
1234
1235 config TPL_TEXT_BASE
1236         hex "Base address for the .text section of the TPL stage"
1237         depends on TPL_NEEDS_SEPARATE_TEXT_BASE
1238         help
1239           The base address for the .text section of the TPL stage.
1240
1241 config TPL_MAX_SIZE
1242         int "Maximum size (in bytes) for the TPL stage"
1243         default 0
1244         depends on TPL
1245         help
1246           The maximum size (in bytes) of the TPL stage.
1247
1248 config TPL_STACK
1249         hex "Address of the initial stack-pointer for the TPL stage"
1250         depends on TPL_NEEDS_SEPARATE_STACK
1251         help
1252           The address of the initial stack-pointer for the TPL stage.
1253           Usually this will be the (aligned) top-of-stack.
1254
1255 config TPL_BOOTROM_SUPPORT
1256         bool "Support returning to the BOOTROM (from TPL)"
1257         help
1258           Some platforms (e.g. the Rockchip RK3368) provide support in their
1259           ROM for loading the next boot-stage after performing basic setup
1260           from the TPL stage.
1261
1262           Enable this option, to return to the BOOTROM through the
1263           BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
1264           boot device list, if not implemented for a given board)
1265
1266 config TPL_DRIVERS_MISC_SUPPORT
1267         bool "Support misc drivers in TPL"
1268         help
1269           Enable miscellaneous drivers in TPL. These drivers perform various
1270           tasks that don't fall nicely into other categories, Enable this
1271           option to build the drivers in drivers/misc as part of an TPL
1272           build, for those that support building in TPL (not all drivers do).
1273
1274 config TPL_ENV_SUPPORT
1275         bool "Support an environment"
1276         help
1277           Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
1278
1279 config TPL_GPIO_SUPPORT
1280         bool "Support GPIO in TPL"
1281         help
1282           Enable support for GPIOs (General-purpose Input/Output) in TPL.
1283           GPIOs allow U-Boot to read the state of an input line (high or
1284           low) and set the state of an output line. This can be used to
1285           drive LEDs, control power to various system parts and read user
1286           input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
1287           for example. Enable this option to build the drivers in
1288           drivers/gpio as part of an TPL build.
1289
1290 config TPL_I2C_SUPPORT
1291         bool "Support I2C"
1292         help
1293           Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for
1294           details.
1295
1296 config TPL_LIBCOMMON_SUPPORT
1297         bool "Support common libraries"
1298         help
1299           Enable support for common U-Boot libraries within TPL. See
1300           SPL_LIBCOMMON_SUPPORT for details.
1301
1302 config TPL_LIBGENERIC_SUPPORT
1303         bool "Support generic libraries"
1304         help
1305           Enable support for generic U-Boot libraries within TPL. See
1306           SPL_LIBGENERIC_SUPPORT for details.
1307
1308 config TPL_MPC8XXX_INIT_DDR_SUPPORT
1309         bool "Support MPC8XXX DDR init"
1310         help
1311           Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
1312           SPL_MPC8XXX_INIT_DDR_SUPPORT for details.
1313
1314 config TPL_MMC_SUPPORT
1315         bool "Support MMC"
1316         depends on MMC
1317         help
1318           Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
1319
1320 config TPL_NAND_SUPPORT
1321         bool "Support NAND flash"
1322         help
1323           Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
1324
1325 config TPL_PCI
1326         bool "Support PCI drivers"
1327         help
1328           Enable support for PCI in TPL. For platforms that need PCI to boot,
1329           or must perform some init using PCI in SPL, this provides the
1330           necessary driver support. This enables the drivers in drivers/pci
1331           as part of a TPL build.
1332
1333 config TPL_PCH_SUPPORT
1334         bool "Support PCH drivers"
1335         help
1336           Enable support for PCH (Platform Controller Hub) devices in TPL.
1337           These are used to set up GPIOs and the SPI peripheral early in
1338           boot. This enables the drivers in drivers/pch as part of a TPL
1339           build.
1340
1341 config TPL_RAM_SUPPORT
1342         bool "Support booting from RAM"
1343         help
1344           Enable booting of an image in RAM. The image can be preloaded or
1345           it can be loaded by TPL directly into RAM (e.g. using USB).
1346
1347 config TPL_RAM_DEVICE
1348         bool "Support booting from preloaded image in RAM"
1349         depends on TPL_RAM_SUPPORT
1350         help
1351           Enable booting of an image already loaded in RAM. The image has to
1352           be already in memory when TPL takes over, e.g. loaded by the boot
1353           ROM.
1354
1355 config TPL_RTC_SUPPORT
1356         bool "Support RTC drivers"
1357         help
1358           Enable RTC (Real-time Clock) support in TPL. This includes support
1359           for reading and setting the time. Some RTC devices also have some
1360           non-volatile (battery-backed) memory which is accessible if
1361           needed. This enables the drivers in drivers/rtc as part of an TPL
1362           build.
1363
1364 config TPL_SERIAL_SUPPORT
1365         bool "Support serial"
1366         select TPL_PRINTF
1367         select TPL_STRTO
1368         help
1369           Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
1370           details.
1371
1372 config TPL_SPI_FLASH_SUPPORT
1373         bool "Support SPI flash drivers"
1374         help
1375           Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
1376           for details.
1377
1378 config TPL_SPI_LOAD
1379         bool "Support loading from SPI flash"
1380         depends on TPL_SPI_FLASH_SUPPORT
1381         help
1382           Enable support for loading next stage, U-Boot or otherwise, from
1383           SPI NOR in U-Boot TPL.
1384
1385 config TPL_SPI_SUPPORT
1386         bool "Support SPI drivers"
1387         help
1388           Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for
1389           details.
1390
1391 config TPL_YMODEM_SUPPORT
1392         bool "Support loading using Ymodem"
1393         depends on TPL_SERIAL_SUPPORT
1394         help
1395           While loading from serial is slow it can be a useful backup when
1396           there is no other option. The Ymodem protocol provides a reliable
1397           means of transmitting U-Boot over a serial line for using in TPL,
1398           with a checksum to ensure correctness.
1399
1400 endif # TPL
1401
1402 config SPL_AT91_MCK_BYPASS
1403         bool "Use external clock signal as a source of main clock for AT91 platforms"
1404         depends on ARCH_AT91
1405         default n
1406         help
1407           Use external 8 to 24 Mhz clock signal as source of main clock instead
1408           of an external crystal oscillator.
1409           This option disables the internal driving on the XOUT pin.
1410           The external source has to provide a stable clock on the XIN pin.
1411           If this option is disabled, the SoC expects a crystal oscillator
1412           that needs driving on both XIN and XOUT lines.
1413
1414 endif # SPL
1415 endmenu