Convert CONFIG_CLOCKS to Kconfig
[platform/kernel/u-boot.git] / common / Kconfig
index bcb3519..8f8a906 100644 (file)
@@ -1,5 +1,3 @@
-source "common/Kconfig.boot"
-
 menu "Console"
 
 config MENU
@@ -17,6 +15,14 @@ config CONSOLE_RECORD
          To enable console recording, call console_record_reset_enable()
          from your code.
 
+config CONSOLE_RECORD_INIT_F
+       bool "Enable console recording during pre-relocation init"
+       depends on CONSOLE_RECORD && SYS_MALLOC_F
+       default y
+       help
+         This option enables console recording during pre-relocation init.
+         CONFIG_SYS_MALLOC_F must be enabled to use this feature.
+
 config CONSOLE_RECORD_OUT_SIZE
        hex "Output buffer size"
        depends on CONSOLE_RECORD
@@ -26,6 +32,16 @@ config CONSOLE_RECORD_OUT_SIZE
          more data will be recorded until some is removed. The buffer is
          allocated immediately after the malloc() region is ready.
 
+config CONSOLE_RECORD_OUT_SIZE_F
+       hex "Output buffer size before relocation"
+       depends on CONSOLE_RECORD
+       default 0x400 if CONSOLE_RECORD
+       help
+         Set the size of the console output buffer before relocation. When
+         this fills up, no more data will be recorded until some is removed.
+         The buffer is allocated immediately after the early malloc() region is
+         ready.
+
 config CONSOLE_RECORD_IN_SIZE
        hex "Input buffer size"
        depends on CONSOLE_RECORD
@@ -174,8 +190,8 @@ config SYS_CONSOLE_IS_IN_ENV
        default y if CONSOLE_MUX
        help
          This allows multiple input/output devices to be set at boot time.
-         For example, if stdout is set to "serial,video" then output will
-         be sent to both the serial and video devices on boot. The
+         For example, if stdout is set to "serial,vidconsole" then output
+         will be sent to both the serial and video devices on boot. The
          environment variables can be updated after boot to change the
          input/output devices.
 
@@ -314,6 +330,14 @@ config LOGF_FUNC
          Show the function name in log messages by default. This value can
          be overridden using the 'log format' command.
 
+config LOGF_FUNC_PAD
+       int "Number of characters to use for function"
+       default 20
+       help
+         Sets the field width to use when showing the function. Set this to
+         a larger value if you have lots of long function names, and want
+         things to line up.
+
 config LOG_SYSLOG
        bool "Log output to syslog server"
        depends on NET
@@ -435,6 +459,14 @@ endmenu
 
 menu "Init options"
 
+config BOARD_TYPES
+       bool "Call get_board_type() to get and display the board type"
+       help
+         If this option is enabled, checkboard() will call get_board_type()
+         to get a string containing the board type and this will be
+         displayed immediately after the model is shown on the console
+         early in boot.
+
 config DISPLAY_CPUINFO
        bool "Display information about the CPU during start up"
        default y if ARC|| ARM || NIOS2 || X86 || XTENSA || M68K
@@ -460,6 +492,37 @@ config DISPLAY_BOARDINFO_LATE
 
 menu "Start-up hooks"
 
+config EVENT
+       bool "General-purpose event-handling mechanism"
+       default y if SANDBOX
+       help
+         This enables sending and processing of events, to allow interested
+         parties to be alerted when something happens. This is an attempt to
+         step the flow of weak functions, hooks, functions in board_f.c
+         and board_r.c and the Kconfig options below.
+
+         See doc/develop/event.rst for more information.
+
+if EVENT
+
+config EVENT_DYNAMIC
+       bool "Support event registration at runtime"
+       default y if SANDBOX
+       help
+         Enable this to support adding an event spy at runtime, without adding
+         it to the EVENT_SPy() linker list. This increases code size slightly
+         but provides more flexibility for boards and subsystems that need it.
+
+config EVENT_DEBUG
+       bool "Enable event debugging assistance"
+       default y if SANDBOX
+       help
+         Enable this get usefui features for seeing what is happening with
+         events, such as event-type names. This adds to the code size of
+         U-Boot so can be turned off for production builds.
+
+endif # EVENT
+
 config ARCH_EARLY_INIT_R
        bool "Call arch-specific init soon after relocation"
        help
@@ -492,6 +555,12 @@ config BOARD_EARLY_INIT_R
          relocation. With this option, U-Boot calls board_early_init_r()
          in the post-relocation init sequence.
 
+config BOARD_POSTCLK_INIT
+       bool "Call board_postclk_init"
+       help
+         Some boards need this to initialize select items, after clocks /
+         timebase and before env / serial.
+
 config BOARD_LATE_INIT
        bool "Execute Board late init"
        help
@@ -502,6 +571,19 @@ config BOARD_LATE_INIT
          So this config enable the late init code with the help of board_late_init
          function which should defined on respective boards.
 
+config CLOCKS
+       bool "Call set_cpu_clk_info"
+       depends on ARM
+
+config SYS_FSL_CLK
+       bool
+       depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || \
+               (FSL_ESDHC_IMX && (ARCH_MX5 || ARCH_MX6 || ARCH_MX7))
+       default y
+       help
+         Enable to call get_clocks() in board_init_f() for platforms other
+         than PowerPC or M68k.  This is a legacy option.  If not TARGET_BRPPT2
+
 config LAST_STAGE_INIT
        bool "Call board-specific as last setup step"
        help
@@ -518,48 +600,30 @@ config MISC_INIT_R
        help
          Enabling this option calls 'misc_init_r' function
 
+config ID_EEPROM
+       bool "Enable I2C connected system identifier EEPROM"
+       help
+         A number of different systems and vendors enable a vendor-specified
+         EEPROM that contains various identifying features.
+
 config PCI_INIT_R
        bool "Enumerate PCI buses during init"
        depends on PCI
-       default y if !DM_PCI
        help
          With this option U-Boot will call pci_init() soon after relocation,
          which will enumerate PCI buses. This is needed, for instance, in the
          case of DM PCI-based Ethernet devices, which will not be detected
          without having the enumeration performed earlier.
 
-endmenu
-
-endmenu                # Init options
-
-config VERSION_VARIABLE
-       bool "add U-Boot environment variable vers"
-       default n
+config RESET_PHY_R
+       bool "Reset ethernet PHY during init"
        help
-         If this variable is defined, an environment variable
-         named "ver" is created by U-Boot showing the U-Boot
-         version as printed by the "version" command.
-         Any change to this variable will be reverted at the
-         next reset.
+         Implement reset_phy() in board code if required to reset the ethernet
+         PHY.
 
-config BOUNCE_BUFFER
-       bool "Include bounce buffer API"
-       help
-         Some peripherals support DMA from a subset of physically
-         addressable memory only.  To support such peripherals, the
-         bounce buffer API uses a temporary buffer: it copies data
-         to/from DMA regions while managing cache operations.
-
-         A second possible use of bounce buffers is their ability to
-         provide aligned buffers for DMA operations.
+endmenu
 
-config BOARD_TYPES
-       bool "Call get_board_type() to get and display the board type"
-       help
-         If this option is enabled, checkboard() will call get_board_type()
-         to get a string containing the board type and this will be
-         displayed immediately after the model is shown on the console
-         early in boot.
+endmenu                # Init options
 
 menu "Security support"
 
@@ -574,6 +638,7 @@ config HASH
 config AVB_VERIFY
        bool "Build Android Verified Boot operations"
        depends on LIBAVB
+       depends on MMC
        depends on PARTITION_UUIDS
        help
          This option enables compilation of bootloader-dependent operations,
@@ -600,6 +665,14 @@ config AVB_BUF_SIZE
 
 endif # AVB_VERIFY
 
+config SCP03
+       bool "Build SCP03 - Secure Channel Protocol O3 - controls"
+       depends on OPTEE || SANDBOX
+       depends on TEE
+       help
+         This option allows U-Boot to enable and or provision SCP03 on an OPTEE
+         controlled Secured Element.
+
 config SPL_HASH
        bool # "Support hashing API (SHA1, SHA256, etc.)"
        help
@@ -616,13 +689,32 @@ config TPL_HASH
          and the algorithms it supports are defined in common/hash.c. See
          also CMD_HASH for command-line access.
 
+config STACKPROTECTOR
+       bool "Stack Protector buffer overflow detection"
+       help
+         Enable stack smash detection through compiler's stack-protector
+         canary logic
+
+config SPL_STACKPROTECTOR
+       bool "Stack Protector buffer overflow detection for SPL"
+       depends on STACKPROTECTOR && SPL
+
+config TPL_STACKPROTECTOR
+       bool "Stack Protector buffer overflow detection for TPL"
+       depends on STACKPROTECTOR && TPL
+
 endmenu
 
 menu "Update support"
 
+config UPDATE_COMMON
+       bool
+       select DFU_WRITE_ALT
+
 config UPDATE_TFTP
        bool "Auto-update using fitImage via TFTP"
        depends on FIT
+       select UPDATE_COMMON
        help
          This option allows performing update of NOR with data in fitImage
          sent via TFTP boot.
@@ -637,9 +729,17 @@ config UPDATE_TFTP_MSEC_MAX
        default 100
        depends on UPDATE_TFTP
 
+config UPDATE_FIT
+       bool "Firmware update using fitImage"
+       depends on FIT
+       depends on DFU
+       select UPDATE_COMMON
+       help
+         This option allows performing update of DFU-capable storage with
+         data in fitImage.
+
 config ANDROID_AB
        bool "Android A/B updates"
-       default n
        help
          If enabled, adds support for the new Android A/B update model. This
          allows the bootloader to select which slot to boot from based on the
@@ -658,7 +758,7 @@ config BLOBLIST
          from TPL to SPL to U-Boot proper (and potentially to Linux). The
          blob list supports multiple binary blobs of data, each with a tag,
          so that different U-Boot components can store data which can survive
-         through to the next stage of the boot.
+         through to the next phase of the boot.
 
 config SPL_BLOBLIST
        bool "Support for a bloblist in SPL"
@@ -677,23 +777,117 @@ config TPL_BLOBLIST
          This enables a bloblist in TPL. The bloblist is set up in TPL and
          passed to SPL and U-Boot proper.
 
+if BLOBLIST
+
+choice
+       prompt "Bloblist location"
+       help
+         Select the location of the bloblist, via various means.
+
+config BLOBLIST_FIXED
+       bool "Place bloblist at a fixed address in memory"
+       help
+         Select this to used a fixed memory address for the bloblist. If the
+         bloblist exists at this address from a previous phase, it used as is.
+         If not it is created at this address in U-Boot.
+
+config BLOBLIST_ALLOC
+       bool "Allocate bloblist"
+       help
+         Allocate the bloblist using malloc(). This avoids the need to
+         specify a fixed address on systems where this is unknown or can
+         change at runtime.
+
+endchoice
+
+config BLOBLIST_ADDR
+       hex "Address of bloblist"
+       default 0xc000 if SANDBOX
+       depends on BLOBLIST_FIXED
+       help
+         Sets the address of the bloblist, set up by the first part of U-Boot
+         which runs. Subsequent U-Boot phases typically use the same address.
+
+         This is not used if BLOBLIST_ALLOC is selected.
+
 config BLOBLIST_SIZE
        hex "Size of bloblist"
-       depends on BLOBLIST
        default 0x400
        help
          Sets the size of the bloblist in bytes. This must include all
          overhead (alignment, bloblist header, record header). The bloblist
          is set up in the first part of U-Boot to run (TPL, SPL or U-Boot
-         proper), and this sane bloblist is used for subsequent stages.
+         proper), and this sane bloblist is used for subsequent phases.
 
-config BLOBLIST_ADDR
-       hex "Address of bloblist"
-       depends on BLOBLIST
-       default 0xe000 if SANDBOX
+config BLOBLIST_SIZE_RELOC
+       hex "Size of bloblist after relocation"
+       default BLOBLIST_SIZE if BLOBLIST_FIXED || BLOBLIST_ALLOC
+       default 0 if BLOBLIST_PASSAGE
        help
-         Sets the address of the bloblist, set up by the first part of U-Boot
-         which runs. Subsequent U-Boot stages typically use the same address.
+         Sets the size of the bloblist in bytes after relocation. Since U-Boot
+         has a lot more memory available then, it is possible to use a larger
+         size than the one set up by SPL. This bloblist is set up during the
+         relocation process.
+
+endif # BLOBLIST
+
+if SPL_BLOBLIST
+
+choice
+       prompt "Bloblist location in SPL"
+       help
+         Select the location of the bloblist, via various means. Typically
+         you should use the same value for SPL as for U-Boot, since they need
+         to look in the same place. But if BLOBLIST_ALLOC is used, then a
+         fresh bloblist will be created each time, since there is no shared
+         address (between phases) for the bloblist.
+
+config SPL_BLOBLIST_FIXED
+       bool "Place bloblist at a fixed address in memory"
+       help
+         Select this to used a fixed memory address for the bloblist. If the
+         bloblist exists at this address from a previous phase, it used as is.
+         If not it is created at this address in SPL.
+
+config SPL_BLOBLIST_ALLOC
+       bool "Allocate bloblist"
+       help
+         Allocate the bloblist using malloc(). This avoids the need to
+         specify a fixed address on systems where this is unknown or can
+         change at runtime.
+
+endchoice
+
+endif # SPL_BLOBLIST
+
+if TPL_BLOBLIST
+
+choice
+       prompt "Bloblist location in TPL"
+       help
+         Select the location of the bloblist, via various means. Typically
+         you should use the same value for SPL as for U-Boot, since they need
+         to look in the same place. But if BLOBLIST_ALLOC is used, then a
+         fresh bloblist will be created each time, since there is no shared
+         address (between phases) for the bloblist.
+
+config TPL_BLOBLIST_FIXED
+       bool "Place bloblist at a fixed address in memory"
+       help
+         Select this to used a fixed memory address for the bloblist. If the
+         bloblist exists at this address from a previous phase, it used as is.
+         If not it is created at this address in TPL.
+
+config TPL_BLOBLIST_ALLOC
+       bool "Allocate bloblist"
+       help
+         Allocate the bloblist using malloc(). This avoids the need to
+         specify a fixed address on systems where this is unknown or can
+         change at runtime.
+
+endchoice
+
+endif # TPL_BLOBLIST
 
 endmenu
 
@@ -716,3 +910,12 @@ config SPL_IMAGE_SIGN_INFO
          Enable image_sign_info helper functions in SPL.
 
 endif
+
+config FDT_SIMPLEFB
+       bool "FDT tools for simplefb support"
+       depends on OF_LIBFDT
+       help
+         Enable the fdt tools to manage the simple fb nodes in device tree.
+         These functions can be used by board to indicate to the OS
+         the presence of the simple frame buffer with associated reserved
+         memory