Merge tag 'xilinx-for-v2020.10' of https://gitlab.denx.de/u-boot/custodians/u-boot...
[platform/kernel/u-boot.git] / common / spl / Kconfig
index 562eafe..3eae65e 100644 (file)
@@ -91,20 +91,24 @@ config SPL_SYS_REPORT_STACK_F_USAGE
          occurrence of non 0xaa bytes.
          This default implementation works for stacks growing down only.
 
-menu "PowerPC SPL Boot options"
-       depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
+menu "PowerPC and LayerScape SPL Boot options"
 
 config SPL_NAND_BOOT
        bool "Load SPL from NAND flash"
+       depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
 
 config SPL_MMC_BOOT
        bool "Load SPL from SD Card / eMMC"
+       depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
 
 config SPL_SPI_BOOT
        bool "Load SPL from SPI flash"
+       depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)
 
 config SPL_FSL_PBL
        bool "Create SPL in Freescale PBI format"
+       depends on (PPC || ARCH_LS1021A || ARCH_LS1043A || ARCH_LS1046A) && \
+                   SUPPORT_SPL
        help
          Create boot binary having SPL binary in PBI format concatenated with
          u-boot binary.
@@ -135,7 +139,7 @@ config SPL_HANDOFF
 
 config SPL_LDSCRIPT
        string "Linker script for the SPL stage"
-       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
+       default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
        help
          The SPL stage will usually require a different linker-script
          (as it runs from a different memory region) than the regular
@@ -268,7 +272,7 @@ config SPL_BANNER_PRINT
        default y
        help
          If this option is enabled, SPL will print the banner with version
-         info. Disabling this option could be useful to reduce TPL boot time
+         info. Disabling this option could be useful to reduce SPL boot time
          (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
 
 config TPL_BANNER_PRINT
@@ -276,8 +280,8 @@ config TPL_BANNER_PRINT
        depends on TPL
        default y
        help
-         If this option is enabled, SPL will not print the banner with version
-         info. Disabling this option could be useful to reduce SPL boot time
+         If this option is enabled, TPL will print the banner with version
+         info. Disabling this option could be useful to reduce TPL boot time
          (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
 
 config SPL_EARLY_BSS
@@ -304,7 +308,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
                     ARCH_MX6 || ARCH_MX7 || \
                     ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
                     ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
-                    OMAP44XX || OMAP54XX || AM33XX || AM43XX
+                    OMAP44XX || OMAP54XX || AM33XX || AM43XX || TARGET_SIFIVE_FU540
        help
          Use sector number for specifying U-Boot location on MMC/SD in
          raw mode.
@@ -321,15 +325,22 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
        default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
                         OMAP54XX || AM33XX || AM43XX || ARCH_K3
        default 0x4000 if ARCH_ROCKCHIP
+       default 0x822 if TARGET_SIFIVE_FU540
        help
          Address on the MMC to load U-Boot from, when the MMC is being used
          in raw mode. Units: MMC sectors (1 sector = 512 bytes).
 
-config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
-       int "Number of the eMMC boot partition to use"
-       default 1
+config SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET
+       hex "U-Boot main hardware partition image offset"
+       depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
+       default 0x0
        help
-         eMMC boot partition number to use when the eMMC in raw mode.
+         On some platforms SPL location depends on hardware partition. The ROM
+         code skips the MBR sector when loading SPL from main hardware data
+         partition. This adds offset to the main U-Boot image. Set this symbol
+         to the number of skipped sectors.
+
+         If unsure, leave the default.
 
 config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
        bool "MMC Raw mode: by partition"
@@ -359,6 +370,28 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
          Partition Type on the MMC to load U-Boot from, when the MMC is being
          used in raw mode.
 
+config SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
+       bool "Override eMMC EXT_CSC_PART_CONFIG by user defined partition"
+       depends on SUPPORT_EMMC_BOOT
+       help
+         eMMC boot partition is normally configured by the bits of the EXT_CSD
+         register (EXT_CSC_PART_CONFIG), BOOT_PARTITION_ENABLE field. In some
+         cases it might be required in SPL to load the image from different
+         partition than the partition selected by EXT_CSC_PART_CONFIG register.
+         Enable this option if you intend to use an eMMC boot partition other
+         then selected via EXT_CSC_PART_CONFIG register and specify the custom
+         partition number by the CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
+         option.
+
+config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
+       int "Number of the eMMC boot partition to use"
+       depends on SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
+       default 1
+       help
+         eMMC boot partition number to use when the eMMC in raw mode and
+         the eMMC EXT_CSC_PART_CONFIG selection should be overridden in SPL
+         by user defined partition number.
+
 config SPL_CRC32_SUPPORT
        bool "Support CRC32"
        default y if SPL_LEGACY_IMAGE_SUPPORT
@@ -379,7 +412,7 @@ config SPL_MD5_SUPPORT
          secure as it is possible (with a brute-force attack) to adjust the
          image while still retaining the same MD5 hash value. For secure
          applications where images may be changed maliciously, you should
-         consider SHA1 or SHA256.
+         consider SHA256 or SHA384.
 
 config SPL_SHA1_SUPPORT
        bool "Support SHA1"
@@ -391,7 +424,7 @@ config SPL_SHA1_SUPPORT
          image contents have not been corrupted or maliciously altered.
          While SHA1 is fairly secure it is coming to the end of its life
          due to the expanding computing power available to brute-force
-         attacks. For more security, consider SHA256.
+         attacks. For more security, consider SHA256 or SHA384.
 
 config SPL_SHA256_SUPPORT
        bool "Support SHA256"
@@ -400,12 +433,28 @@ config SPL_SHA256_SUPPORT
        help
          Enable this to support SHA256 in FIT images within SPL. A SHA256
          checksum is a 256-bit (32-byte) hash value used to check that the
-         image contents have not been corrupted. SHA256 is recommended for
-         use in secure applications since (as at 2016) there is no known
-         feasible attack that could produce a 'collision' with differing
-         input data. Use this for the highest security. Note that only the
-         SHA256 variant is supported: SHA512 and others are not currently
-         supported in U-Boot.
+         image contents have not been corrupted.
+
+config SPL_SHA384_SUPPORT
+       bool "Support SHA384"
+       depends on SPL_FIT
+       select SHA384
+       select SHA512_ALGO
+       help
+         Enable this to support SHA384 in FIT images within SPL. A SHA384
+         checksum is a 384-bit (48-byte) hash value used to check that the
+         image contents have not been corrupted. Use this for the highest
+         security.
+
+config SPL_SHA512_SUPPORT
+       bool "Support SHA512"
+       depends on SPL_FIT
+       select SHA512
+       select SHA512_ALGO
+       help
+         Enable this to support SHA512 in FIT images within SPL. A SHA512
+         checksum is a 512-bit (64-byte) hash value used to check that the
+         image contents have not been corrupted.
 
 config SPL_FIT_IMAGE_TINY
        bool "Remove functionality from SPL FIT loading to reduce size"
@@ -423,6 +472,13 @@ config SPL_FIT_IMAGE_TINY
          ensure this information is available to the next image
          invoked).
 
+config SPL_CACHE_SUPPORT
+       bool "Support CACHE drivers"
+       help
+         Enable CACHE drivers in SPL. These drivers can keep data so that
+         future requests for that data can be served faster. Enable this option
+         to build the drivers in drivers/cache as part of an SPL build.
+
 config SPL_CPU_SUPPORT
        bool "Support CPU drivers"
        help
@@ -461,7 +517,7 @@ config TPL_HASH_SUPPORT
          this option to build system-specific drivers for hash acceleration
          as part of an SPL build.
 
-config SPL_DMA_SUPPORT
+config SPL_DMA
        bool "Support DMA drivers"
        help
          Enable DMA (direct-memory-access) drivers in SPL. These drivers
@@ -624,15 +680,6 @@ config SPL_MMC_SUPPORT
          this option to build the drivers in drivers/mmc as part of an SPL
          build.
 
-config SPL_FORCE_MMC_BOOT
-       bool "Force SPL booting from MMC"
-       depends on SPL_MMC_SUPPORT
-       default n
-       help
-         Force SPL to use MMC device for Linux kernel booting even when the
-         SoC ROM recognized boot medium is not eMMC/SD. This is crucial for
-         factory or 'falcon mode' booting.
-
 config SPL_MMC_TINY
        bool "Tiny MMC framework in SPL"
        depends on SPL_MMC_SUPPORT
@@ -698,6 +745,12 @@ config SPL_UBI
          README.ubispl for more info.
 
 if SPL_DM
+config SPL_CACHE
+       depends on CACHE
+       bool "Support cache drivers in SPL"
+       help
+         Enable support for cache drivers in SPL.
+
 config SPL_DM_SPI
        bool "Support SPI DM drivers in SPL"
        help
@@ -934,7 +987,7 @@ config SPL_POWER_DOMAIN
 
 config SPL_RAM_SUPPORT
        bool "Support booting from RAM"
-       default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
+       default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
        help
          Enable booting of an image in RAM. The image can be preloaded or
          it can be loaded by SPL directly into RAM (e.g. using USB).
@@ -942,7 +995,7 @@ config SPL_RAM_SUPPORT
 config SPL_RAM_DEVICE
        bool "Support booting from preloaded image in RAM"
        depends on SPL_RAM_SUPPORT
-       default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
+       default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ
        help
          Enable booting of an image already loaded in RAM. The image has to
          be already in memory when SPL takes over, e.g. loaded by the boot
@@ -998,8 +1051,19 @@ config SPL_SERIAL_SUPPORT
          unless there are space reasons not to. Even then, consider
          enabling SPL_USE_TINY_PRINTF which is a small printf() version.
 
+config SPL_SPI_SUPPORT
+       bool "Support SPI drivers"
+       help
+         Enable support for using SPI in SPL. This is used for connecting
+         to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
+         more details on that. The SPI driver provides the transport for
+         data between the SPI flash and the CPU. This option can be used to
+         enable SPI drivers that are needed for other purposes also, such
+         as a SPI PMIC.
+
 config SPL_SPI_FLASH_SUPPORT
        bool "Support SPI flash drivers"
+       depends on SPL_SPI_SUPPORT
        help
          Enable support for using SPI flash in SPL, and loading U-Boot from
          SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
@@ -1038,22 +1102,13 @@ endif # SPL_SPI_FLASH_SUPPORT
 
 config SYS_SPI_U_BOOT_OFFS
        hex "address of u-boot payload in SPI flash"
+       default 0x8000 if ARCH_SUNXI
        default 0x0
        depends on SPL_SPI_LOAD || SPL_SPI_SUNXI
        help
         Address within SPI-Flash from where the u-boot payload is fetched
         from.
 
-config SPL_SPI_SUPPORT
-       bool "Support SPI drivers"
-       help
-         Enable support for using SPI in SPL. This is used for connecting
-         to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
-         more details on that. The SPI driver provides the transport for
-         data between the SPI flash and the CPU. This option can be used to
-         enable SPI drivers that are needed for other purposes also, such
-         as a SPI PMIC.
-
 config SPL_THERMAL
        bool "Driver support for thermal devices"
        help
@@ -1134,6 +1189,14 @@ config SPL_USB_SDP_SUPPORT
          Enable Serial Download Protocol (SDP) device support in SPL. This
          allows to download images into memory and execute (jump to) them
          using the same protocol as implemented by the i.MX family's boot ROM.
+
+config SPL_SDP_USB_DEV
+       int "SDP USB controller index"
+       default 0
+       depends on SPL_USB_SDP_SUPPORT
+       help
+         Some boards have USB controller other than 0. Define this option
+         so it can be used in compiled environment.
 endif
 
 config SPL_WATCHDOG_SUPPORT
@@ -1216,6 +1279,22 @@ config TPL
 
 if TPL
 
+config TPL_SIZE_LIMIT
+       hex "Maximum size of TPL image"
+       depends on TPL
+       default 0
+       help
+         Specifies the maximum length of the U-Boot TPL image.
+         If this value is zero, it is ignored.
+
+config TPL_FRAMEWORK
+       bool "Support TPL based upon the common SPL framework"
+       default y if SPL_FRAMEWORK
+       help
+         Enable the SPL framework under common/spl/ for TPL builds.
+         This framework supports MMC, NAND and YMODEM and other methods
+         loading of U-Boot's SPL stage. If unsure, say Y.
+
 config TPL_HANDOFF
        bool "Pass hand-off information from TPL to SPL and U-Boot proper"
        depends on HANDOFF && TPL_BLOBLIST
@@ -1237,7 +1316,7 @@ config TPL_LDSCRIPT
         string "Linker script for the TPL stage"
        depends on TPL
        default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
-       default "arch/$(ARCH)/cpu/u-boot-spl.lds"
+       default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
        help
          The TPL stage will usually require a different linker-script
          (as it runs from a different memory region) than the regular