Skip to contentSkip to conversation

efi_loader: select BLK not depends on BLK

PATCH In review Tom Rini 2 participants 5 messages Jun 5, 2024 – Jun 18, 2024

Subsystems (6)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/3 efi_loader: select BLK not depends on BLK

The BLK symbol is used both for "we have a block device subsystem enabled" and "we need to utilize the block device library functions". In the case of efi_loader, it is the case of "we need to utilize the block device library", so select rather than depends on it. In turn, also disable EFI_LOADER on platforms which did not have it on previously due to a lack of block devices. They can enable it themselves if desired.

---
Cc: Heinrich Schuchardt <[email protected]>

---
 configs/cortina_presidio-asic-base_defconfig     | 1 +
 configs/cortina_presidio-asic-pnand_defconfig    | 1 +
 configs/crs305-1g-4s-bit_defconfig               | 1 +
 configs/crs305-1g-4s_defconfig                   | 1 +
 configs/crs326-24g-2s-bit_defconfig              | 1 +
 configs/crs326-24g-2s_defconfig                  | 1 +
 configs/crs328-4c-20s-4s-bit_defconfig           | 1 +
 configs/crs328-4c-20s-4s_defconfig               | 1 +
 configs/gxp_defconfig                            | 1 +
 configs/maxbcm_defconfig                         | 1 +
 configs/mt7981_rfb_defconfig                     | 1 +
 configs/mt7986_rfb_defconfig                     | 1 +
 configs/mx6memcal_defconfig                      | 1 +
 configs/pg_wcom_expu1_defconfig                  | 1 +
 configs/pg_wcom_expu1_update_defconfig           | 1 +
 configs/pg_wcom_seli8_defconfig                  | 1 +
 configs/pg_wcom_seli8_update_defconfig           | 1 +
 configs/r8a77970_eagle_defconfig                 | 1 +
 configs/smdkc100_defconfig                       | 1 +
 configs/socfpga_is1_defconfig                    | 1 +
 configs/stm32mp25_defconfig                      | 1 +
 configs/thunderx_88xx_defconfig                  | 1 +
 configs/xilinx_versal_mini_defconfig             | 1 +
 configs/xilinx_versal_mini_ospi_defconfig        | 1 +
 configs/xilinx_versal_mini_qspi_defconfig        | 1 +
 configs/xilinx_versal_net_mini_defconfig         | 1 +
 configs/xilinx_versal_net_mini_ospi_defconfig    | 1 +
 configs/xilinx_versal_net_mini_qspi_defconfig    | 1 +
 configs/xilinx_zynqmp_mini_defconfig             | 1 +
 configs/xilinx_zynqmp_mini_nand_defconfig        | 1 +
 configs/xilinx_zynqmp_mini_nand_single_defconfig | 1 +
 configs/xilinx_zynqmp_mini_qspi_defconfig        | 1 +
 configs/zynq_cse_nand_defconfig                  | 1 +
 configs/zynq_cse_nor_defconfig                   | 1 +
 configs/zynq_cse_qspi_defconfig                  | 1 +
 lib/efi_loader/Kconfig                           | 2 +-
 36 files changed, 36 insertions(+), 1 deletion(-)
configs/cortina_presidio-asic-base_defconfig +1 -0
index 8f20f6515606..eb5743da64db 100644
@@ -38,3 +38,4 @@ CONFIG_DM_SERIAL=y
 CONFIG_CORTINA_UART=y
 CONFIG_WDT=y
 CONFIG_WDT_CORTINA=y
+# CONFIG_EFI_LOADER is not set
configs/cortina_presidio-asic-pnand_defconfig +1 -0
index 94dc3e1e2e8e..c7367d4d91cc 100644
@@ -43,3 +43,4 @@ CONFIG_DM_SERIAL=y
 CONFIG_CORTINA_UART=y
 CONFIG_WDT=y
 CONFIG_WDT_CORTINA=y
+# CONFIG_EFI_LOADER is not set
configs/crs305-1g-4s-bit_defconfig +1 -0
index a8f17570ecaa..c3d4594b75f7 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/crs305-1g-4s_defconfig +1 -0
index c66d291eb926..1919e8c7794d 100644
@@ -48,3 +48,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/crs326-24g-2s-bit_defconfig +1 -0
index b754dac45ec3..a584c26eb90f 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/crs326-24g-2s_defconfig +1 -0
index 870127d38720..43f7455afbf6 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/crs328-4c-20s-4s-bit_defconfig +1 -0
index 2373775dc5a9..7bf671643a90 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/crs328-4c-20s-4s_defconfig +1 -0
index 9bac12217a03..2f50bdaf1e7d 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/gxp_defconfig +1 -0
index 00a9211fb052..d37749bd5e31 100644
@@ -59,3 +59,4 @@ CONFIG_TIMER=y
 CONFIG_GXP_TIMER=y
 # CONFIG_RANDOM_UUID is not set
 CONFIG_SHA512=y
+# CONFIG_EFI_LOADER is not set
configs/maxbcm_defconfig +1 -0
index 9906099e8c56..5424259ca445 100644
@@ -62,3 +62,4 @@ CONFIG_SPL_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
+# CONFIG_EFI_LOADER is not set
configs/mt7981_rfb_defconfig +1 -0
index 817e4b3e119d..3989c79d2b11 100644
@@ -64,4 +64,5 @@ CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MTK_SPIM=y
 CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_LMB_MAX_REGIONS=64
configs/mt7986_rfb_defconfig +1 -0
index 35227ebd3406..4d0cc85d0e57 100644
@@ -64,4 +64,5 @@ CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_MTK_SPIM=y
 CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_LMB_MAX_REGIONS=64
configs/mx6memcal_defconfig +1 -0
index 7f11e6f5d451..4c8a5960d38a 100644
@@ -44,3 +44,4 @@ CONFIG_BOUNCE_BUFFER=y
 CONFIG_FSL_USDHC=y
 CONFIG_MXC_UART=y
 CONFIG_OF_LIBFDT=y
+# CONFIG_EFI_LOADER is not set
configs/pg_wcom_expu1_defconfig +1 -0
index 2be9e242b589..61513c9e2ec9 100644
@@ -104,5 +104,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_POST=y
 CONFIG_HUSH_OLD_PARSER=y
configs/pg_wcom_expu1_update_defconfig +1 -0
index 9245a56adea0..ec0f975ae365 100644
@@ -102,5 +102,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_POST=y
 CONFIG_HUSH_OLD_PARSER=y
configs/pg_wcom_seli8_defconfig +1 -0
index 033dd82b28ec..82923d32ca69 100644
@@ -104,5 +104,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_POST=y
 CONFIG_HUSH_OLD_PARSER=y
configs/pg_wcom_seli8_update_defconfig +1 -0
index 4d34ef6d680e..41931e247688 100644
@@ -102,5 +102,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
 CONFIG_POST=y
 CONFIG_HUSH_OLD_PARSER=y
configs/r8a77970_eagle_defconfig +1 -0
index 09ea1c54f137..1dbbb2e26095 100644
@@ -80,3 +80,4 @@ CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_TEE=y
 CONFIG_OPTEE=y
+# CONFIG_EFI_LOADER is not set
configs/smdkc100_defconfig +1 -0
index 54a037904594..256190ddabfc 100644
@@ -39,3 +39,4 @@ CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
 CONFIG_SAMSUNG_ONENAND=y
 CONFIG_SMC911X=y
+# CONFIG_EFI_LOADER is not set
configs/socfpga_is1_defconfig +1 -0
index f0a364a562b8..0fff9080d417 100644
@@ -68,3 +68,4 @@ CONFIG_SPI=y
 CONFIG_CADENCE_QSPI=y
 # CONFIG_SPL_WDT is not set
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+# CONFIG_EFI_LOADER is not set
configs/stm32mp25_defconfig +1 -0
index 9fbd7eb15755..87038cc773ab 100644
@@ -48,6 +48,7 @@ CONFIG_WDT=y
 CONFIG_WDT_STM32MP=y
 CONFIG_WDT_ARM_SMC=y
 CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB_USE_MAX_REGIONS is not set
 CONFIG_LMB_MEMORY_REGIONS=2
 CONFIG_LMB_RESERVED_REGIONS=32
configs/thunderx_88xx_defconfig +1 -0
index 247e32d8e378..b754cc01cc81 100644
@@ -36,3 +36,4 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_MMC is not set
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
+# CONFIG_EFI_LOADER is not set
configs/xilinx_versal_mini_defconfig +1 -0
index 9d3924cc9cbc..b97bf5e60a94 100644
@@ -62,4 +62,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_MMC is not set
 CONFIG_ARM_DCC=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_versal_mini_ospi_defconfig +1 -0
index 7a110350c2cd..8f1625976032 100644
@@ -72,4 +72,5 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_HAS_CQSPI_REF_CLK=y
 CONFIG_CQSPI_REF_CLK=200000000
 CONFIG_CADENCE_OSPI_VERSAL=y
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_versal_mini_qspi_defconfig +1 -0
index 58945a1cac9c..8fbde1c7d3ca 100644
@@ -76,4 +76,5 @@ CONFIG_ARM_DCC=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_ZYNQMP_GQSPI=y
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_versal_net_mini_defconfig +1 -0
index 7dac1ec54eb4..d6ebd0804637 100644
@@ -71,4 +71,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARM_DCC=y
 CONFIG_PL01X_SERIAL=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_versal_net_mini_ospi_defconfig +1 -0
index d78c9f805990..872a4a55952f 100644
@@ -70,4 +70,5 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_HAS_CQSPI_REF_CLK=y
 CONFIG_CQSPI_REF_CLK=200000000
 CONFIG_CADENCE_OSPI_VERSAL=y
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_versal_net_mini_qspi_defconfig +1 -0
index b0567f857a3a..00319e061020 100644
@@ -74,4 +74,5 @@ CONFIG_ARM_DCC=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_ZYNQMP_GQSPI=y
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_zynqmp_mini_defconfig +1 -0
index 7fdd2eee5552..4b45074efc48 100644
@@ -60,4 +60,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_zynqmp_mini_nand_defconfig +1 -0
index d2e920fc5732..b4719536be16 100644
@@ -60,4 +60,5 @@ CONFIG_SYS_NAND_MAX_CHIPS=2
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_zynqmp_mini_nand_single_defconfig +1 -0
index 31f647357f75..7ede17654dd0 100644
@@ -59,4 +59,5 @@ CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/xilinx_zynqmp_mini_qspi_defconfig +1 -0
index 957ae07b80ef..0d79ecece71a 100644
@@ -92,4 +92,5 @@ CONFIG_SPI=y
 CONFIG_ZYNQMP_GQSPI=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/zynq_cse_nand_defconfig +1 -0
index 48473d784439..750ea0db2b22 100644
@@ -79,4 +79,5 @@ CONFIG_SYS_NAND_ONFI_DETECTION=y
 CONFIG_ARM_DCC=y
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/zynq_cse_nor_defconfig +1 -0
index 9f2b738d9d13..3155fe0b3783 100644
@@ -83,4 +83,5 @@ CONFIG_SYS_FLASH_QUIET_TEST=y
 CONFIG_ARM_DCC=y
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
configs/zynq_cse_qspi_defconfig +1 -0
index 5b861bdde180..f2e1aa6d3abf 100644
@@ -93,4 +93,5 @@ CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_QSPI=y
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
 # CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
 # CONFIG_LMB is not set
lib/efi_loader/Kconfig +1 -1
index 430bb7f0f7dc..ee71f417147a 100644
@@ -10,9 +10,9 @@ config EFI_LOADER
 	depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT
 	# We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
 	depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
-	depends on BLK
 	depends on !EFI_APP
 	default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
+	select BLK
 	select CHARSET
 	# We need to send DM events, dynamically, in the EFI block driver
 	select DM_EVENT
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/3 spl: nvme: Make this depend on SPL_BLK

As this is an SPL related driver, and in SPL enabling SPL_BLK is optional, make this depend on the correct symbol.

---
 common/spl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/Kconfig +1 -1
index 6405374bcc12..80c80d9904fd 100644
@@ -1293,7 +1293,7 @@ config SPL_SATA_RAW_U_BOOT_SECTOR
 
 config SPL_NVME
 	bool "NVM Express device support"
-	depends on BLK
+	depends on SPL_BLK
 	select FS_LOADER
 	select SPL_BLK_FS
 	help
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 3/3 block: Update BLK to be def_bool

In reply to Tom Rini

At this point in the DM migration, all platforms enable DM. BLK requires DM. Make BLK "def_bool y" in the cases it had been "default y" to make this clearer. Now remove the symbol requirement from other places as it is redundant here.

---
 drivers/ata/Kconfig   |  1 -
 drivers/block/Kconfig |  4 ++--
 drivers/mmc/Kconfig   | 30 ++++++++++++++----------------
 3 files changed, 16 insertions(+), 19 deletions(-)
drivers/ata/Kconfig +0 -1
index 9bc5283c2688..6cca561f974f 100644
@@ -61,7 +61,6 @@ config DWC_AHCI
 config DWC_AHSATA
 	bool "Enable DWC AHSATA driver support"
 	select LIBATA
-	depends on BLK
 	help
 	  Enable this driver to support the DWC AHSATA SATA controller found
 	  in i.MX5 and i.MX6 SoCs.
drivers/block/Kconfig +2 -2
index 6ad18889f61e..48529a6982f5 100644
@@ -1,8 +1,8 @@
 config BLK
 	bool # "Support block devices"
 	depends on DM
-	default y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA
-	default y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK
+	def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA
+	def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK
 	help
 	  Enable support for block devices, such as SCSI, MMC and USB
 	  flash sticks. These provide a block-level interface which permits
drivers/mmc/Kconfig +14 -16
index d0944793c92d..8b13a0821ee0 100644
@@ -41,7 +41,6 @@ config MMC_BROKEN_CD
 config DM_MMC
 	bool "Enable MMC controllers using Driver Model"
 	depends on DM
-	select BLK
 	help
 	  This enables the MultiMediaCard (MMC) uclass which supports MMC and
 	  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
@@ -249,7 +248,6 @@ config MMC_DW_CORTINA
 	bool "Cortina specific extensions for Synopsys DW Memory Card Interface"
 	depends on DM_MMC
 	depends on MMC_DW
-	depends on BLK
 	help
 	  This selects support for Cortina SoC specific extensions to the
 	  Synopsys DesignWare Memory Card Interface driver. Select this option
@@ -313,7 +311,7 @@ config NEXELL_DWMMC
 
 config MMC_MESON_GX
 	bool "Meson GX EMMC controller support"
-	depends on DM_MMC && BLK && ARCH_MESON
+	depends on DM_MMC && ARCH_MESON
 	help
 	 Support for EMMC host controller on Meson GX ARM SoCs platform (S905)
 
@@ -367,7 +365,7 @@ config MMC_OCTEONTX
 
 config MVEBU_MMC
 	bool "Kirkwood MMC controller support"
-	depends on DM_MMC && BLK && ARCH_KIRKWOOD
+	depends on DM_MMC && ARCH_KIRKWOOD
 	help
 	  Support for MMC host controller on Kirkwood SoCs.
 	  If you are on a Kirkwood architecture, say Y here.
@@ -420,7 +418,7 @@ config SH_MMCIF
 config MMC_UNIPHIER
 	bool "UniPhier SD/MMC Host Controller support"
 	depends on ARCH_UNIPHIER
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on OF_CONTROL
 	help
 	  This selects support for the Matsushita SD/MMC Host Controller on
@@ -429,7 +427,7 @@ config MMC_UNIPHIER
 config RENESAS_SDHI
 	bool "Renesas R-Car SD/MMC Host Controller support"
 	depends on ARCH_RENESAS
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on OF_CONTROL
 	select BOUNCE_BUFFER
 	help
@@ -439,7 +437,7 @@ config RENESAS_SDHI
 config MMC_BCM2835
 	bool "BCM2835 family custom SD/MMC Host Controller support"
 	depends on ARCH_BCM283X
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on OF_CONTROL
 	default y
 	help
@@ -459,7 +457,7 @@ config JZ47XX_MMC
 config MMC_SANDBOX
 	bool "Sandbox MMC support"
 	depends on SANDBOX
-	depends on BLK && DM_MMC && OF_CONTROL
+	depends on DM_MMC && OF_CONTROL
 	help
 	  This select a dummy sandbox MMC driver. At present this does nothing
 	  other than allow sandbox to be build with MMC support. This
@@ -561,7 +559,7 @@ config MMC_SDHCI_ASPEED
 config MMC_SDHCI_ATMEL
 	bool "Atmel SDHCI controller support"
 	depends on ARCH_AT91
-	depends on DM_MMC && BLK && ARCH_AT91
+	depends on DM_MMC && ARCH_AT91
 	depends on MMC_SDHCI
 	help
 	  This enables support for the Atmel SDHCI controller, which supports
@@ -596,7 +594,7 @@ config MMC_SDHCI_BCMSTB
 
 config MMC_SDHCI_CADENCE
 	bool "SDHCI support for the Cadence SD/SDIO/eMMC controller"
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on MMC_SDHCI
 	depends on OF_CONTROL
 	help
@@ -608,7 +606,7 @@ config MMC_SDHCI_CADENCE
 
 config MMC_SDHCI_CV1800B
 	bool "SDHCI support for the CV1800B SD/SDIO/eMMC controller"
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on MMC_SDHCI
 	depends on OF_CONTROL
 	help
@@ -643,7 +641,7 @@ config MMC_SDHCI_IPROC
 
 config MMC_SDHCI_F_SDH30
 	bool "SDHCI support for Fujitsu Semiconductor/Socionext F_SDH30"
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on MMC_SDHCI
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
@@ -663,7 +661,7 @@ config MMC_SDHCI_KONA
 
 config MMC_SDHCI_MSM
 	bool "Qualcomm SDHCI controller"
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on MMC_SDHCI
 	help
 	  Enables support for SDHCI 2.0 controller present on some Qualcomm
@@ -829,7 +827,7 @@ config MMC_PITON
 
 config GENERIC_ATMEL_MCI
 	bool "Atmel Multimedia Card Interface support"
-	depends on DM_MMC && BLK && ARCH_AT91
+	depends on DM_MMC && ARCH_AT91
 	help
 	  This enables support for Atmel High Speed Multimedia Card Interface
 	  (HSMCI), which supports the MultiMedia Card (MMC) Specification V4.3,
@@ -838,7 +836,7 @@ config GENERIC_ATMEL_MCI
 
 config STM32_SDMMC2
 	bool "STMicroelectronics STM32H7 SD/MMC Host Controller support"
-	depends on DM_MMC && BLK && OF_CONTROL
+	depends on DM_MMC && OF_CONTROL
 	help
 	  This selects support for the SD/MMC controller on STM32H7 SoCs.
 	  If you have a board based on such a SoC and with a SD/MMC slot,
@@ -858,7 +856,7 @@ config FTSDC010_SDIO
 config MMC_MTK
 	bool "MediaTek SD/MMC Card Interface support"
 	depends on ARCH_MEDIATEK || ARCH_MTMIPS
-	depends on BLK && DM_MMC
+	depends on DM_MMC
 	depends on OF_CONTROL
 	help
 	  This selects the MediaTek(R) Secure digital and Multimedia card Interface.
Signature · 1 line
2.34.1
Acked-by on v1 1/3
#3 lore raw
In reply to Tom Rini

Am 5. Juni 2024 03:37:40 MESZ schrieb Tom Rini <[email protected]>:

Quoted 10 lines

The BLK symbol is used both for "we have a block device subsystem enabled" and "we need to utilize the block device library functions". In the case of efi_loader, it is the case of "we need to utilize the block device library", so select rather than depends on it. In turn, also disable EFI_LOADER on platforms which did not have it on previously due to a lack of block devices. They can enable it themselves if desired.

---
Cc: Heinrich Schuchardt <[email protected]>

Quoted 395 lines

---

configs/cortina_presidio-asic-base_defconfig     | 1 +
configs/cortina_presidio-asic-pnand_defconfig    | 1 +
configs/crs305-1g-4s-bit_defconfig               | 1 +
configs/crs305-1g-4s_defconfig                   | 1 +
configs/crs326-24g-2s-bit_defconfig              | 1 +
configs/crs326-24g-2s_defconfig                  | 1 +
configs/crs328-4c-20s-4s-bit_defconfig           | 1 +
configs/crs328-4c-20s-4s_defconfig               | 1 +
configs/gxp_defconfig                            | 1 +
configs/maxbcm_defconfig                         | 1 +
configs/mt7981_rfb_defconfig                     | 1 +
configs/mt7986_rfb_defconfig                     | 1 +
configs/mx6memcal_defconfig                      | 1 +
configs/pg_wcom_expu1_defconfig                  | 1 +
configs/pg_wcom_expu1_update_defconfig           | 1 +
configs/pg_wcom_seli8_defconfig                  | 1 +
configs/pg_wcom_seli8_update_defconfig           | 1 +
configs/r8a77970_eagle_defconfig                 | 1 +
configs/smdkc100_defconfig                       | 1 +
configs/socfpga_is1_defconfig                    | 1 +
configs/stm32mp25_defconfig                      | 1 +
configs/thunderx_88xx_defconfig                  | 1 +
configs/xilinx_versal_mini_defconfig             | 1 +
configs/xilinx_versal_mini_ospi_defconfig        | 1 +
configs/xilinx_versal_mini_qspi_defconfig        | 1 +
configs/xilinx_versal_net_mini_defconfig         | 1 +
configs/xilinx_versal_net_mini_ospi_defconfig    | 1 +
configs/xilinx_versal_net_mini_qspi_defconfig    | 1 +
configs/xilinx_zynqmp_mini_defconfig             | 1 +
configs/xilinx_zynqmp_mini_nand_defconfig        | 1 +
configs/xilinx_zynqmp_mini_nand_single_defconfig | 1 +
configs/xilinx_zynqmp_mini_qspi_defconfig        | 1 +
configs/zynq_cse_nand_defconfig                  | 1 +
configs/zynq_cse_nor_defconfig                   | 1 +
configs/zynq_cse_qspi_defconfig                  | 1 +
lib/efi_loader/Kconfig                           | 2 +-
36 files changed, 36 insertions(+), 1 deletion(-)
configs/cortina_presidio-asic-base_defconfig +0 -0
index 8f20f6515606..eb5743da64db 100644
@@ -38,3 +38,4 @@ CONFIG_DM_SERIAL=y

CONFIG_CORTINA_UART=y
CONFIG_WDT=y
CONFIG_WDT_CORTINA=y

configs/cortina_presidio-asic-base_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/cortina_presidio-asic-pnand_defconfig +0 -0
index 94dc3e1e2e8e..c7367d4d91cc 100644
@@ -43,3 +43,4 @@ CONFIG_DM_SERIAL=y

CONFIG_CORTINA_UART=y
CONFIG_WDT=y
CONFIG_WDT_CORTINA=y

configs/cortina_presidio-asic-pnand_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs305-1g-4s-bit_defconfig +0 -0
index a8f17570ecaa..c3d4594b75f7 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs305-1g-4s-bit_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs305-1g-4s_defconfig +0 -0
index c66d291eb926..1919e8c7794d 100644
@@ -48,3 +48,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs305-1g-4s_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs326-24g-2s-bit_defconfig +0 -0
index b754dac45ec3..a584c26eb90f 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs326-24g-2s-bit_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs326-24g-2s_defconfig +0 -0
index 870127d38720..43f7455afbf6 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs326-24g-2s_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs328-4c-20s-4s-bit_defconfig +0 -0
index 2373775dc5a9..7bf671643a90 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs328-4c-20s-4s-bit_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/crs328-4c-20s-4s_defconfig +0 -0
index 9bac12217a03..2f50bdaf1e7d 100644
@@ -47,3 +47,4 @@ CONFIG_SPI_FLASH_MTD=y

CONFIG_PCI_MVEBU=y
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/crs328-4c-20s-4s_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/gxp_defconfig +0 -0
index 00a9211fb052..d37749bd5e31 100644
@@ -59,3 +59,4 @@ CONFIG_TIMER=y

CONFIG_GXP_TIMER=y
# CONFIG_RANDOM_UUID is not set
CONFIG_SHA512=y

configs/gxp_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/maxbcm_defconfig +0 -0
index 9906099e8c56..5424259ca445 100644
@@ -62,3 +62,4 @@ CONFIG_SPL_DEBUG_UART_BASE=0xd0012000

CONFIG_DEBUG_UART_SHIFT=2
CONFIG_SYS_NS16550=y
CONFIG_KIRKWOOD_SPI=y

configs/maxbcm_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/mt7981_rfb_defconfig +0 -0
index 817e4b3e119d..3989c79d2b11 100644
@@ -64,4 +64,5 @@ CONFIG_SPI=y

CONFIG_DM_SPI=y
CONFIG_MTK_SPIM=y
CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set
CONFIG_LMB_MAX_REGIONS=64

configs/mt7986_rfb_defconfig +0 -0
index 35227ebd3406..4d0cc85d0e57 100644
@@ -64,4 +64,5 @@ CONFIG_SPI=y

CONFIG_DM_SPI=y
CONFIG_MTK_SPIM=y
CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set
CONFIG_LMB_MAX_REGIONS=64

configs/mx6memcal_defconfig +0 -0
index 7f11e6f5d451..4c8a5960d38a 100644
@@ -44,3 +44,4 @@ CONFIG_BOUNCE_BUFFER=y

CONFIG_FSL_USDHC=y
CONFIG_MXC_UART=y
CONFIG_OF_LIBFDT=y

configs/mx6memcal_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/pg_wcom_expu1_defconfig +0 -0
index 2be9e242b589..61513c9e2ec9 100644
@@ -104,5 +104,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y

CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
CONFIG_POST=y
CONFIG_HUSH_OLD_PARSER=y

configs/pg_wcom_expu1_update_defconfig +0 -0
index 9245a56adea0..ec0f975ae365 100644
@@ -102,5 +102,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y

CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
CONFIG_POST=y
CONFIG_HUSH_OLD_PARSER=y

configs/pg_wcom_seli8_defconfig +0 -0
index 033dd82b28ec..82923d32ca69 100644
@@ -104,5 +104,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y

CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
CONFIG_POST=y
CONFIG_HUSH_OLD_PARSER=y

configs/pg_wcom_seli8_update_defconfig +0 -0
index 4d34ef6d680e..41931e247688 100644
@@ -102,5 +102,6 @@ CONFIG_SPECIFY_CONSOLE_INDEX=y

CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LZO=y
+# CONFIG_EFI_LOADER is not set
CONFIG_POST=y
CONFIG_HUSH_OLD_PARSER=y

configs/r8a77970_eagle_defconfig +0 -0
index 09ea1c54f137..1dbbb2e26095 100644
@@ -80,3 +80,4 @@ CONFIG_DM_SPI=y

CONFIG_RENESAS_RPC_SPI=y
CONFIG_TEE=y
CONFIG_OPTEE=y

configs/r8a77970_eagle_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/smdkc100_defconfig +0 -0
index 54a037904594..256190ddabfc 100644
@@ -39,3 +39,4 @@ CONFIG_ENV_IS_IN_ONENAND=y

CONFIG_MTD=y
CONFIG_SAMSUNG_ONENAND=y
CONFIG_SMC911X=y

configs/smdkc100_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/socfpga_is1_defconfig +0 -0
index f0a364a562b8..0fff9080d417 100644
@@ -68,3 +68,4 @@ CONFIG_SPI=y

CONFIG_CADENCE_QSPI=y
# CONFIG_SPL_WDT is not set
CONFIG_SYS_TIMER_COUNTS_DOWN=y

configs/socfpga_is1_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/stm32mp25_defconfig +0 -0
index 9fbd7eb15755..87038cc773ab 100644
@@ -48,6 +48,7 @@ CONFIG_WDT=y

CONFIG_WDT_STM32MP=y
CONFIG_WDT_ARM_SMC=y
CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB_USE_MAX_REGIONS is not set
CONFIG_LMB_MEMORY_REGIONS=2
CONFIG_LMB_RESERVED_REGIONS=32

configs/thunderx_88xx_defconfig +0 -0
index 247e32d8e378..b754cc01cc81 100644
@@ -36,3 +36,4 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_MMC is not set

CONFIG_DM_SERIAL=y
CONFIG_DEBUG_UART_SKIP_INIT=y

configs/thunderx_88xx_defconfig +1 -0
+# CONFIG_EFI_LOADER is not set
configs/xilinx_versal_mini_defconfig +0 -0
index 9d3924cc9cbc..b97bf5e60a94 100644
@@ -62,4 +62,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_MMC is not set

CONFIG_ARM_DCC=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_versal_mini_ospi_defconfig +0 -0
index 7a110350c2cd..8f1625976032 100644
@@ -72,4 +72,5 @@ CONFIG_CADENCE_QSPI=y

CONFIG_HAS_CQSPI_REF_CLK=y
CONFIG_CQSPI_REF_CLK=200000000
CONFIG_CADENCE_OSPI_VERSAL=y
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_versal_mini_qspi_defconfig +0 -0
index 58945a1cac9c..8fbde1c7d3ca 100644
@@ -76,4 +76,5 @@ CONFIG_ARM_DCC=y

CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ZYNQMP_GQSPI=y
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_versal_net_mini_defconfig +0 -0
index 7dac1ec54eb4..d6ebd0804637 100644
@@ -71,4 +71,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y

CONFIG_ARM_DCC=y
CONFIG_PL01X_SERIAL=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_versal_net_mini_ospi_defconfig +0 -0
index d78c9f805990..872a4a55952f 100644
@@ -70,4 +70,5 @@ CONFIG_CADENCE_QSPI=y

CONFIG_HAS_CQSPI_REF_CLK=y
CONFIG_CQSPI_REF_CLK=200000000
CONFIG_CADENCE_OSPI_VERSAL=y
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_versal_net_mini_qspi_defconfig +0 -0
index b0567f857a3a..00319e061020 100644
@@ -74,4 +74,5 @@ CONFIG_ARM_DCC=y

CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ZYNQMP_GQSPI=y
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_zynqmp_mini_defconfig +0 -0
index 7fdd2eee5552..4b45074efc48 100644
@@ -60,4 +60,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y

CONFIG_ARM_DCC=y
CONFIG_PANIC_HANG=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_zynqmp_mini_nand_defconfig +0 -0
index d2e920fc5732..b4719536be16 100644
@@ -60,4 +60,5 @@ CONFIG_SYS_NAND_MAX_CHIPS=2

CONFIG_ARM_DCC=y
CONFIG_PANIC_HANG=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_zynqmp_mini_nand_single_defconfig +0 -0
index 31f647357f75..7ede17654dd0 100644
@@ -59,4 +59,5 @@ CONFIG_SYS_NAND_ONFI_DETECTION=y

CONFIG_ARM_DCC=y
CONFIG_PANIC_HANG=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/xilinx_zynqmp_mini_qspi_defconfig +0 -0
index 957ae07b80ef..0d79ecece71a 100644
@@ -92,4 +92,5 @@ CONFIG_SPI=y

CONFIG_ZYNQMP_GQSPI=y
CONFIG_PANIC_HANG=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/zynq_cse_nand_defconfig +0 -0
index 48473d784439..750ea0db2b22 100644
@@ -79,4 +79,5 @@ CONFIG_SYS_NAND_ONFI_DETECTION=y

CONFIG_ARM_DCC=y
CONFIG_SYS_TIMER_COUNTS_DOWN=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/zynq_cse_nor_defconfig +0 -0
index 9f2b738d9d13..3155fe0b3783 100644
@@ -83,4 +83,5 @@ CONFIG_SYS_FLASH_QUIET_TEST=y

CONFIG_ARM_DCC=y
CONFIG_SYS_TIMER_COUNTS_DOWN=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

configs/zynq_cse_qspi_defconfig +0 -0
index 5b861bdde180..f2e1aa6d3abf 100644
@@ -93,4 +93,5 @@ CONFIG_ARM_DCC=y

CONFIG_ZYNQ_QSPI=y
CONFIG_SYS_TIMER_COUNTS_DOWN=y
# CONFIG_GZIP is not set
+# CONFIG_EFI_LOADER is not set
# CONFIG_LMB is not set

lib/efi_loader/Kconfig +1 -1
index 430bb7f0f7dc..ee71f417147a 100644
@@ -10,9 +10,9 @@ config EFI_LOADER
 	depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT
 	# We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
 	depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
-	depends on BLK
 	depends on !EFI_APP
 	default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
+	select BLK
 	select CHARSET
 	# We need to send DM events, dynamically, in the EFI block driver
 	select DM_EVENT
author
#4 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

The BLK symbol is used both for "we have a block device subsystem enabled" and "we need to utilize the block device library functions". In the case of efi_loader, it is the case of "we need to utilize the block device library", so select rather than depends on it. In turn, also disable EFI_LOADER on platforms which did not have it on previously due to a lack of block devices. They can enable it themselves if desired.

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom