* [PATCH 0/6] Rework the BLK symbol usage in Kconfig
@ 2024-12-20 22:22 Tom Rini
2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini
` (6 more replies)
0 siblings, 7 replies; 38+ messages in thread
From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw)
To: u-boot
Hey all,
One problem we have today is how the BLK symbol is set and used in
Kconfig files. Part of the challenge is that we use it as a gating
symbol for "we have a block device" and also for "enable block device
library code". What this series does is move to always use "select BLK"
by block drivers (a few were and a few others had it the inverse) and
then "depends on BLK" for functionality that needs a block device
present. The end result of this series is that a number of platforms
which had disabled EFI_LOADER now don't ask for it (they have no block
device) and espresso7420 has a regression about MMC support fixed.
--
Tom
^ permalink raw reply [flat|nested] 38+ messages in thread* [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-22 23:49 ` Jaehoon Chung 2025-01-14 13:25 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini ` (5 subsequent siblings) 6 siblings, 2 replies; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot At this point in time, MMC will always have BLK enabled, so we do not need to list that as a dependency for MMC drivers. Signed-off-by: Tom Rini <trini@konsulko.com> --- drivers/mmc/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index f4fdf15242ce..9f2fecce3826 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -338,7 +338,7 @@ config MMC_MXC config MMC_OWL bool "Actions OWL Multimedia Card Interface support" - depends on ARCH_OWL && DM_MMC && BLK + depends on ARCH_OWL && DM_MMC help This selects the OWL SD/MMC host controller found on board based on Actions S700/S900 SoC. @@ -633,7 +633,7 @@ config MMC_SDHCI_AM654 bool "SDHCI Controller on TI's Am654 devices" depends on ARCH_K3 depends on MMC_SDHCI - depends on DM_MMC && OF_CONTROL && BLK + depends on DM_MMC && OF_CONTROL depends on REGMAP select MMC_SDHCI_IO_ACCESSORS help @@ -716,7 +716,7 @@ config MMC_SDHCI_PIC32 config MMC_SDHCI_ROCKCHIP bool "Arasan SDHCI controller for Rockchip support" depends on ARCH_ROCKCHIP - depends on DM_MMC && BLK + depends on DM_MMC depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform @@ -764,7 +764,7 @@ config MMC_SDHCI_XENON config MMC_SDHCI_TANGIER bool "Tangier SDHCI controller support" - depends on DM_MMC && BLK + depends on DM_MMC depends on MMC_SDHCI help This selects support for SDHCI controller on Tanginer @@ -800,7 +800,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK config MMC_SDHCI_ZYNQ bool "Arasan SDHCI controller support" - depends on DM_MMC && OF_CONTROL && BLK + depends on DM_MMC && OF_CONTROL depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform @@ -842,7 +842,7 @@ config MMC_SUNXI_HAS_MODE_SWITCH config MMC_PITON bool "MMC support for OpenPiton SoC" - depends on DM_MMC && BLK + depends on DM_MMC help This selects support for the SD host controller on OpenPiton SoC. Note that this SD controller directly exposes the contents of the -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* RE: [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies 2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini @ 2024-12-22 23:49 ` Jaehoon Chung 2025-01-14 13:25 ` Quentin Schulz 1 sibling, 0 replies; 38+ messages in thread From: Jaehoon Chung @ 2024-12-22 23:49 UTC (permalink / raw) To: 'Tom Rini', u-boot > -----Original Message----- > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Tom Rini > Sent: Saturday, December 21, 2024 7:22 AM > > At this point in time, MMC will always have BLK enabled, so we do not > need to list that as a dependency for MMC drivers. > > Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > --- > drivers/mmc/Kconfig | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index f4fdf15242ce..9f2fecce3826 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -338,7 +338,7 @@ config MMC_MXC > > config MMC_OWL > bool "Actions OWL Multimedia Card Interface support" > - depends on ARCH_OWL && DM_MMC && BLK > + depends on ARCH_OWL && DM_MMC > help > This selects the OWL SD/MMC host controller found on board > based on Actions S700/S900 SoC. > @@ -633,7 +633,7 @@ config MMC_SDHCI_AM654 > bool "SDHCI Controller on TI's Am654 devices" > depends on ARCH_K3 > depends on MMC_SDHCI > - depends on DM_MMC && OF_CONTROL && BLK > + depends on DM_MMC && OF_CONTROL > depends on REGMAP > select MMC_SDHCI_IO_ACCESSORS > help > @@ -716,7 +716,7 @@ config MMC_SDHCI_PIC32 > config MMC_SDHCI_ROCKCHIP > bool "Arasan SDHCI controller for Rockchip support" > depends on ARCH_ROCKCHIP > - depends on DM_MMC && BLK > + depends on DM_MMC > depends on MMC_SDHCI > help > Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform > @@ -764,7 +764,7 @@ config MMC_SDHCI_XENON > > config MMC_SDHCI_TANGIER > bool "Tangier SDHCI controller support" > - depends on DM_MMC && BLK > + depends on DM_MMC > depends on MMC_SDHCI > help > This selects support for SDHCI controller on Tanginer > @@ -800,7 +800,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK > > config MMC_SDHCI_ZYNQ > bool "Arasan SDHCI controller support" > - depends on DM_MMC && OF_CONTROL && BLK > + depends on DM_MMC && OF_CONTROL > depends on MMC_SDHCI > help > Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform > @@ -842,7 +842,7 @@ config MMC_SUNXI_HAS_MODE_SWITCH > > config MMC_PITON > bool "MMC support for OpenPiton SoC" > - depends on DM_MMC && BLK > + depends on DM_MMC > help > This selects support for the SD host controller on OpenPiton SoC. > Note that this SD controller directly exposes the contents of the > -- > 2.43.0 ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies 2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini 2024-12-22 23:49 ` Jaehoon Chung @ 2025-01-14 13:25 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 1 sibling, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-14 13:25 UTC (permalink / raw) To: Tom Rini, u-boot Hi Tom, On 12/20/24 11:22 PM, Tom Rini wrote: > At this point in time, MMC will always have BLK enabled, so we do not This was not clear to me as to why until I read the definition of the BLK symbol. Could you please reword the commit log to make this clearer? Something like: At this point in time, BLK defaults to enabled when MMC is enabled, so we do not With that, Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks! Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies 2025-01-14 13:25 ` Quentin Schulz @ 2025-01-14 16:58 ` Tom Rini 0 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-14 16:58 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 567 bytes --] On Tue, Jan 14, 2025 at 02:25:45PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 12/20/24 11:22 PM, Tom Rini wrote: > > At this point in time, MMC will always have BLK enabled, so we do not > > This was not clear to me as to why until I read the definition of the BLK > symbol. Could you please reword the commit log to make this clearer? > Something like: > > At this point in time, BLK defaults to enabled when MMC is enabled, so we do > not > > With that, > Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Will do, thanks. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:43 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 3/6] efi_loader: Depend on BLK Tom Rini ` (4 subsequent siblings) 6 siblings, 2 replies; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot Cc: NXP i.MX U-Boot Team, Fabio Estevam, Minkyu Kang, Rayagonda Kokatanur, Stefano Babic, Svyatoslav Ryhel, Thierry Reding At this point in time, DM is always enabled. So if MMC is enabled, it should select DM_MMC. No drivers need to depend on DM_MMC being enabled now, so remove that from dependency lists. This now means that a number of platforms which select'd DM_MMC need to select MMC instead. Signed-off-by: Tom Rini <trini@konsulko.com> --- Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Svyatoslav Ryhel <clamor95@gmail.com> Cc: Thierry Reding <treding@nvidia.com> --- arch/Kconfig | 2 +- arch/arm/Kconfig | 18 +++------ arch/arm/mach-exynos/Kconfig | 8 ++-- arch/arm/mach-imx/mx5/Kconfig | 2 +- arch/arm/mach-imx/mx6/Kconfig | 32 +++++++-------- arch/arm/mach-omap2/omap3/Kconfig | 2 +- arch/arm/mach-s5pc1xx/Kconfig | 2 +- arch/arm/mach-tegra/Kconfig | 2 +- drivers/mmc/Kconfig | 65 +++++++++++-------------------- 9 files changed, 52 insertions(+), 81 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 6258788f53ff..44ae4b3babdf 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -172,13 +172,13 @@ config SANDBOX select DM_GPIO select DM_I2C select DM_KEYBOARD - select DM_MMC select DM_SERIAL select DM_SPI select DM_SPI_FLASH select GZIP_COMPRESSED select IO_TRACE select LZO + select MMC select MTD select OF_BOARD_SETUP select PCI_ENDPOINT diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ea414fe376a8..ea256f687867 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1163,7 +1163,6 @@ config ARCH_SUNXI select DM_SPI if SPI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD - select DM_MMC if MMC select DM_SERIAL select OF_BOARD_SETUP select OF_CONTROL @@ -1211,7 +1210,6 @@ config ARCH_U8500 select CPU_V7A select DM select DM_GPIO - select DM_MMC if MMC select DM_SERIAL select DM_USB_GADGET if DM_USB select OF_CONTROL @@ -1236,7 +1234,6 @@ config ARCH_VERSAL select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select GICV3 select OF_CONTROL @@ -1249,7 +1246,6 @@ config ARCH_VERSAL2 select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply BOARD_LATE_INIT @@ -1261,7 +1257,6 @@ config ARCH_VERSAL_NET select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply BOARD_LATE_INIT @@ -1286,7 +1281,6 @@ config ARCH_ZYNQ select CPU_V7A select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART select DM - select DM_MMC if MMC select DM_SERIAL select DM_SPI select DM_SPI_FLASH @@ -1315,7 +1309,6 @@ config ARCH_ZYNQMP_R5 select CLK select CPU_V7R select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply CMD_DM @@ -1329,7 +1322,6 @@ config ARCH_ZYNQMP select DM select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART imply DM_MAILBOX - select DM_MMC if MMC select DM_SERIAL select MTD select DM_SPI if SPI @@ -1397,8 +1389,8 @@ config TARGET_TOTAL_COMPUTE select PL01X_SERIAL select DM select DM_SERIAL - select DM_MMC select DM_GPIO + select MMC imply OF_HAS_PRIOR_STAGE imply MISC_INIT_R @@ -1904,7 +1896,7 @@ config TARGET_SL28 select DM select DM_GPIO select DM_I2C - select DM_MMC + select MMC select MTD select DM_SPI_FLASH select DM_MDIO @@ -1945,10 +1937,10 @@ config ARCH_UNIPHIER select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_MTD select DM_RESET select DM_SERIAL + select MMC select OF_BOARD_SETUP select OF_CONTROL select OF_LIBFDT @@ -1992,9 +1984,9 @@ config ARCH_STI select BLK select CPU_V7A select DM - select DM_MMC select DM_RESET select DM_SERIAL + select MMC imply CMD_DM help Support for STMicroelectronics STiH407/10 SoC family. @@ -2041,7 +2033,6 @@ config ARCH_ROCKCHIP select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PWM select DM_REGULATOR select DM_SERIAL @@ -2050,6 +2041,7 @@ config ARCH_ROCKCHIP select DM_USB_GADGET if USB_DWC3_GADGET select ENABLE_ARM_SOC_BOOT0_HOOK select OF_CONTROL + select MMC select MTD select SPI select SPL_DM if SPL diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 3fee5a4299b8..7e6959510087 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -19,7 +19,7 @@ config ARCH_EXYNOS4 select BOARD_EARLY_INIT_F select CPU_V7A select BLK - select DM_MMC + select MMC help Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There are multiple SoCs in this family including Exynos4210, Exynos4412, @@ -40,7 +40,7 @@ config ARCH_EXYNOS5 imply USB_ETHER_RTL8152 imply USB_ETHER_SMSC95XX select BLK - select DM_MMC + select MMC help Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and @@ -52,7 +52,7 @@ config ARCH_EXYNOS7 select ARM64 select BOARD_EARLY_INIT_F select BLK - select DM_MMC + select MMC help Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or Cortex-A53 CPU (and some in a big.LITTLE configuration). There are @@ -62,7 +62,7 @@ config ARCH_EXYNOS9 bool "Exynos9 SoC family" select ARM64 select BLK - select DM_MMC + select MMC help Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There are multiple SoCs in this family including Exynos850. diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig index d282663dcf1f..4d1e07b14d32 100644 --- a/arch/arm/mach-imx/mx5/Kconfig +++ b/arch/arm/mach-imx/mx5/Kconfig @@ -26,9 +26,9 @@ config TARGET_KP_IMX53 select DM_I2C select DM_PMIC select DM_SERIAL - select DM_MMC select BLK select DM_REGULATOR + select MMC select MX53 imply CMD_DM diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 1f8022ee6853..4020e16d92dc 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -81,8 +81,8 @@ config MX6UL_OPOS6UL select BOARD_LATE_INIT select DM select DM_GPIO - select DM_MMC select DM_THERMAL + select MMC select SPL_DM if SPL select SPL_OF_CONTROL if SPL select SPL_PINCTRL if SPL @@ -176,9 +176,9 @@ config TARGET_DART_6UL select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_DHCOMIMX6 @@ -197,10 +197,10 @@ config TARGET_DISPLAY5 depends on MX6Q select DM select DM_I2C - select DM_MMC select DM_SPI select DM_GPIO select DM_SERIAL + select MMC select MTD select SUPPORT_SPL imply CMD_DM @@ -245,7 +245,7 @@ config TARGET_KOSAGI_NOVENA bool "Kosagi Novena" select BOARD_LATE_INIT select DM_GPIO - select DM_MMC + select MMC select PCI select SCSI select VIDEO @@ -280,8 +280,8 @@ config TARGET_MX6LOGICPD select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PMIC + select MMC select OF_CONTROL imply CMD_DM @@ -300,10 +300,10 @@ config TARGET_MX6DL_MAMOJ select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PMIC select DM_PMIC_PFUZE100 select DM_THERMAL + select MMC select OF_CONTROL select PINCTRL select SPL @@ -332,8 +332,8 @@ config TARGET_MX6Q_ENGICAM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -352,8 +352,8 @@ config TARGET_MX6Q_ACC select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_MX6S_SIELAFF @@ -453,8 +453,8 @@ config TARGET_MX6UL_ENGICAM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -490,9 +490,9 @@ config TARGET_MYS_6ULX select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_NITROGEN6X @@ -507,10 +507,10 @@ config TARGET_NPI_IMX6ULL bool "Seeed NPI-IMX6ULL" depends on MX6ULL select DM - select DM_MMC select DM_GPIO select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_OPOS6ULDEV @@ -566,9 +566,9 @@ config TARGET_PCL063 select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_PCL063_ULL @@ -577,9 +577,9 @@ config TARGET_PCL063_ULL select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_SOMLABS_VISIONSOM_6ULL @@ -588,9 +588,9 @@ config TARGET_SOMLABS_VISIONSOM_6ULL select BOARD_LATE_INIT select DM select DM_GPIO - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC imply CMD_DM config TARGET_TBS2910 @@ -605,7 +605,7 @@ config TARGET_KP_IMX6Q_TPC select DM select SPL_DM if SPL select DM_THERMAL - select DM_MMC + select MMC select DM_REGULATOR select SPL_DM_REGULATOR if SPL select DM_SERIAL @@ -673,7 +673,7 @@ config TARGET_BRPPT2 select DM select DM_GPIO select DM_I2C - select DM_MMC + select MMC select SUPPORT_SPL select SPL_DM if SPL select SPL_OF_CONTROL if SPL diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index f15f44fe7d4b..a175e5ce6edc 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -30,8 +30,8 @@ config TARGET_AM3517_EVM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL + select MMC imply CMD_DM config TARGET_CM_T35 diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig index b6a4b0b653fb..b15b2e7b6a01 100644 --- a/arch/arm/mach-s5pc1xx/Kconfig +++ b/arch/arm/mach-s5pc1xx/Kconfig @@ -8,8 +8,8 @@ config TARGET_S5P_GONI bool "S5P Goni board" select OF_CONTROL select BLK - select DM_MMC select MISC_COMMON + select MMC config TARGET_SMDKC100 bool "Support smdkc100 board" diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 04612895576a..78b89729f191 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -48,13 +48,13 @@ config TEGRA_COMMON select DM_GPIO select DM_I2C select DM_KEYBOARD - select DM_MMC select DM_PWM select DM_RESET select DM_SERIAL select DM_SPI select DM_SPI_FLASH select MISC + select MMC select MTD select OF_CONTROL select SPI diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 9f2fecce3826..46513db0d6e3 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -3,7 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX - select DM_MMC if DM + select DM_MMC help This selects MultiMediaCard, Secure Digital and Secure Digital I/O support. @@ -39,14 +39,14 @@ config MMC_BROKEN_CD If card detection feature is broken, just poll to detect. config DM_MMC - bool "Enable MMC controllers using Driver Model" + bool depends on DM help - This enables the MultiMediaCard (MMC) uclass which supports MMC and - Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.) - and non-removable (e.g. eMMC chip) devices are supported. These - appear as block devices in U-Boot and can support filesystems such - as EXT4 and FAT. + This enables the MultiMediaCard (MMC) driver model uclass which + supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, + micro-SD, etc.) and non-removable (e.g. eMMC chip) devices are + supported. These appear as block devices in U-Boot and can support + filesystems such as EXT4 and FAT. config SPL_DM_MMC bool "Enable MMC controllers using Driver Model in SPL" @@ -79,7 +79,7 @@ config MMC_SDHCI_ADMA_HELPERS config MMC_SPI bool "Support for SPI-based MMC controller" - depends on DM_MMC && DM_SPI + depends on DM_SPI help This selects SPI-based MMC controllers. If you have an MMC controller on a SPI bus, say Y here. @@ -97,7 +97,6 @@ config MMC_SPI_CRC_ON config ARM_PL180_MMCI bool "ARM AMBA Multimedia Card Interface and compatible support" - depends on DM_MMC help This selects the ARM(R) AMBA(R) PrimeCell Multimedia Card Interface (PL180, PL181 and compatible) support. @@ -258,7 +257,6 @@ config MMC_DW config MMC_DW_CORTINA bool "Cortina specific extensions for Synopsys DW Memory Card Interface" - depends on DM_MMC depends on MMC_DW help This selects support for Cortina SoC specific extensions to the @@ -285,7 +283,7 @@ config MMC_DW_K3 config MMC_DW_ROCKCHIP bool "Rockchip SD/MMC controller support" - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on MMC_DW help This enables support for the Rockchip SD/MMM controller, which is @@ -306,7 +304,6 @@ config MMC_DW_SOCFPGA config MMC_DW_SNPS bool "Extensions for DW Memory Card Interface used in Synopsys ARC devboards" depends on MMC_DW - depends on DM_MMC depends on OF_CONTROL depends on CLK help @@ -317,13 +314,12 @@ config NEXELL_DWMMC bool "Nexell SD/MMC controller support" depends on ARCH_NEXELL depends on MMC_DW - depends on DM_MMC depends on PINCTRL_NEXELL default y config MMC_MESON_GX bool "Meson GX EMMC controller support" - depends on DM_MMC && ARCH_MESON + depends on ARCH_MESON help Support for EMMC host controller on Meson GX ARM SoCs platform (S905) @@ -338,7 +334,7 @@ config MMC_MXC config MMC_OWL bool "Actions OWL Multimedia Card Interface support" - depends on ARCH_OWL && DM_MMC + depends on ARCH_OWL help This selects the OWL SD/MMC host controller found on board based on Actions S700/S900 SoC. @@ -366,7 +362,6 @@ config MMC_PCI config MMC_OCTEONTX bool "Marvell Octeon Multimedia Card Interface support" depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) - depends on DM_MMC select MMC_SUPPORTS_TUNING if ARCH_OCTEONTX2 help This selects the Octeon Multimedia card Interface. @@ -377,7 +372,7 @@ config MMC_OCTEONTX config MVEBU_MMC bool "Kirkwood MMC controller support" - depends on DM_MMC && ARCH_KIRKWOOD + depends on ARCH_KIRKWOOD help Support for MMC host controller on Kirkwood SoCs. If you are on a Kirkwood architecture, say Y here. @@ -386,8 +381,7 @@ config MVEBU_MMC config MMC_OMAP_HS bool "TI OMAP High Speed Multimedia Card Interface support" - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR + select DM_REGULATOR_PBIAS if DM_REGULATOR help This selects the TI OMAP High Speed Multimedia card Interface. If you have an omap2plus board with a Multimedia Card slot, @@ -430,7 +424,6 @@ config SH_MMCIF config MMC_UNIPHIER bool "UniPhier SD/MMC Host Controller support" depends on ARCH_UNIPHIER - depends on DM_MMC depends on OF_CONTROL help This selects support for the Matsushita SD/MMC Host Controller on @@ -439,7 +432,6 @@ config MMC_UNIPHIER config RENESAS_SDHI bool "Renesas R-Car SD/MMC Host Controller support" depends on ARCH_RENESAS - depends on DM_MMC depends on OF_CONTROL select BOUNCE_BUFFER help @@ -449,7 +441,6 @@ config RENESAS_SDHI config MMC_BCM2835 bool "BCM2835 family custom SD/MMC Host Controller support" depends on ARCH_BCM283X - depends on DM_MMC depends on OF_CONTROL default y help @@ -469,7 +460,7 @@ config JZ47XX_MMC config MMC_SANDBOX bool "Sandbox MMC support" depends on SANDBOX - depends on DM_MMC && OF_CONTROL + depends on 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 @@ -559,7 +550,6 @@ config FIXED_SDHCI_ALIGNED_BUFFER config MMC_SDHCI_ASPEED bool "Aspeed SDHCI controller" depends on ARCH_ASPEED - depends on DM_MMC depends on MMC_SDHCI select MISC help @@ -571,7 +561,7 @@ config MMC_SDHCI_ASPEED config MMC_SDHCI_ATMEL bool "Atmel SDHCI controller support" depends on ARCH_AT91 - depends on DM_MMC && ARCH_AT91 + depends on ARCH_AT91 depends on MMC_SDHCI help This enables support for the Atmel SDHCI controller, which supports @@ -606,7 +596,6 @@ config MMC_SDHCI_BCMSTB config MMC_SDHCI_CADENCE bool "SDHCI support for the Cadence SD/SDIO/eMMC controller" - depends on DM_MMC depends on MMC_SDHCI depends on OF_CONTROL help @@ -618,7 +607,6 @@ config MMC_SDHCI_CADENCE config MMC_SDHCI_CV1800B bool "SDHCI support for the CV1800B SD/SDIO/eMMC controller" - depends on DM_MMC depends on MMC_SDHCI depends on OF_CONTROL help @@ -633,7 +621,7 @@ config MMC_SDHCI_AM654 bool "SDHCI Controller on TI's Am654 devices" depends on ARCH_K3 depends on MMC_SDHCI - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on REGMAP select MMC_SDHCI_IO_ACCESSORS help @@ -653,7 +641,6 @@ config MMC_SDHCI_IPROC config MMC_SDHCI_F_SDH30 bool "SDHCI support for Fujitsu Semiconductor/Socionext F_SDH30" - depends on DM_MMC depends on MMC_SDHCI help This selects the Secure Digital Host Controller Interface (SDHCI) @@ -673,7 +660,6 @@ config MMC_SDHCI_KONA config MMC_SDHCI_MSM bool "Qualcomm SDHCI controller" - depends on DM_MMC depends on MMC_SDHCI help Enables support for SDHCI 2.0 controller present on some Qualcomm @@ -685,7 +671,6 @@ config MMC_SDHCI_MV bool "SDHCI support on Marvell platform" depends on ARCH_MVEBU depends on MMC_SDHCI - depends on DM_MMC help This selects the Secure Digital Host Controller Interface on Marvell platform. @@ -697,7 +682,6 @@ config MMC_SDHCI_MV config MMC_SDHCI_NPCM bool "SDHCI support on Nuvoton NPCM device" depends on MMC_SDHCI - depends on DM_MMC help This selects the Secure Digital Host Controller Interface (SDHCI) on Nuvoton NPCM device. @@ -708,7 +692,7 @@ config MMC_SDHCI_NPCM config MMC_SDHCI_PIC32 bool "Microchip PIC32 on-chip SDHCI support" - depends on DM_MMC && MACH_PIC32 + depends on MACH_PIC32 depends on MMC_SDHCI help Support for Microchip PIC32 SDHCI controller. @@ -716,7 +700,6 @@ config MMC_SDHCI_PIC32 config MMC_SDHCI_ROCKCHIP bool "Arasan SDHCI controller for Rockchip support" depends on ARCH_ROCKCHIP - depends on DM_MMC depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform @@ -735,7 +718,6 @@ config MMC_SDHCI_S5P config MMC_SDHCI_SNPS bool "Synopsys DesignWare SDHCI controller" depends on MMC_SDHCI - depends on DM_MMC help Support for DesignWare SDHCI host controller on Alibaba TH1520 SoC. This is a highly configurable and programmable, high performance @@ -753,7 +735,7 @@ config MMC_SDHCI_STI config MMC_SDHCI_XENON bool "SDHCI support for the Xenon SDHCI controller" - depends on MMC_SDHCI && DM_MMC && OF_CONTROL + depends on MMC_SDHCI && OF_CONTROL help Support for Xenon SDHCI host controller on Marvell Armada 3700 7k/8k ARM SoCs platforms @@ -764,7 +746,6 @@ config MMC_SDHCI_XENON config MMC_SDHCI_TANGIER bool "Tangier SDHCI controller support" - depends on DM_MMC depends on MMC_SDHCI help This selects support for SDHCI controller on Tanginer @@ -800,7 +781,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK config MMC_SDHCI_ZYNQ bool "Arasan SDHCI controller support" - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform @@ -842,7 +823,6 @@ config MMC_SUNXI_HAS_MODE_SWITCH config MMC_PITON bool "MMC support for OpenPiton SoC" - depends on DM_MMC help This selects support for the SD host controller on OpenPiton SoC. Note that this SD controller directly exposes the contents of the @@ -851,7 +831,7 @@ config MMC_PITON config GENERIC_ATMEL_MCI bool "Atmel Multimedia Card Interface support" - depends on DM_MMC && ARCH_AT91 + depends on ARCH_AT91 help This enables support for Atmel High Speed Multimedia Card Interface (HSMCI), which supports the MultiMedia Card (MMC) Specification V4.3, @@ -860,7 +840,7 @@ config GENERIC_ATMEL_MCI config STM32_SDMMC2 bool "STMicroelectronics STM32H7 SD/MMC Host Controller support" - depends on DM_MMC && OF_CONTROL + depends on 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, @@ -880,7 +860,6 @@ config FTSDC010_SDIO config MMC_MTK bool "MediaTek SD/MMC Card Interface support" depends on ARCH_MEDIATEK || ARCH_MTMIPS - depends on DM_MMC depends on OF_CONTROL help This selects the MediaTek(R) Secure digital and Multimedia card Interface. @@ -911,7 +890,7 @@ config FSL_ESDHC_SUPPORT_ADMA2 config FSL_ESDHC_33V_IO_RELIABILITY_WORKAROUND bool "enable eSDHC workaround for 3.3v IO reliability issue" - depends on FSL_ESDHC && DM_MMC + depends on FSL_ESDHC help When eSDHC operates at 3.3v, damage can accumulate in an internal level shifter at a higher than expected rate. The faster the interface -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol 2024-12-20 22:22 ` [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini @ 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:43 ` Quentin Schulz 1 sibling, 0 replies; 38+ messages in thread From: Peter Robinson @ 2024-12-23 18:26 UTC (permalink / raw) To: Tom Rini Cc: u-boot, NXP i.MX U-Boot Team, Fabio Estevam, Minkyu Kang, Rayagonda Kokatanur, Stefano Babic, Svyatoslav Ryhel, Thierry Reding On Fri, 20 Dec 2024 at 22:26, Tom Rini <trini@konsulko.com> wrote: > At this point in time, DM is always enabled. So if MMC is enabled, it > should select DM_MMC. No drivers need to depend on DM_MMC being enabled > now, so remove that from dependency lists. This now means that a number > of platforms which select'd DM_MMC need to select MMC instead. > > Signed-off-by: Tom Rini <trini@konsulko.com> > Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Looks sane based on my Kconfig knowledge. > --- > Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com> > Cc: Fabio Estevam <festevam@gmail.com> > Cc: Minkyu Kang <mk7.kang@samsung.com> > Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Svyatoslav Ryhel <clamor95@gmail.com> > Cc: Thierry Reding <treding@nvidia.com> > --- > arch/Kconfig | 2 +- > arch/arm/Kconfig | 18 +++------ > arch/arm/mach-exynos/Kconfig | 8 ++-- > arch/arm/mach-imx/mx5/Kconfig | 2 +- > arch/arm/mach-imx/mx6/Kconfig | 32 +++++++-------- > arch/arm/mach-omap2/omap3/Kconfig | 2 +- > arch/arm/mach-s5pc1xx/Kconfig | 2 +- > arch/arm/mach-tegra/Kconfig | 2 +- > drivers/mmc/Kconfig | 65 +++++++++++-------------------- > 9 files changed, 52 insertions(+), 81 deletions(-) > > diff --git a/arch/Kconfig b/arch/Kconfig > index 6258788f53ff..44ae4b3babdf 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -172,13 +172,13 @@ config SANDBOX > select DM_GPIO > select DM_I2C > select DM_KEYBOARD > - select DM_MMC > select DM_SERIAL > select DM_SPI > select DM_SPI_FLASH > select GZIP_COMPRESSED > select IO_TRACE > select LZO > + select MMC > select MTD > select OF_BOARD_SETUP > select PCI_ENDPOINT > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index ea414fe376a8..ea256f687867 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1163,7 +1163,6 @@ config ARCH_SUNXI > select DM_SPI if SPI > select DM_SPI_FLASH if SPI && MTD > select DM_KEYBOARD > - select DM_MMC if MMC > select DM_SERIAL > select OF_BOARD_SETUP > select OF_CONTROL > @@ -1211,7 +1210,6 @@ config ARCH_U8500 > select CPU_V7A > select DM > select DM_GPIO > - select DM_MMC if MMC > select DM_SERIAL > select DM_USB_GADGET if DM_USB > select OF_CONTROL > @@ -1236,7 +1234,6 @@ config ARCH_VERSAL > select ARM64 > select CLK > select DM > - select DM_MMC if MMC > select DM_SERIAL > select GICV3 > select OF_CONTROL > @@ -1249,7 +1246,6 @@ config ARCH_VERSAL2 > select ARM64 > select CLK > select DM > - select DM_MMC if MMC > select DM_SERIAL > select OF_CONTROL > imply BOARD_LATE_INIT > @@ -1261,7 +1257,6 @@ config ARCH_VERSAL_NET > select ARM64 > select CLK > select DM > - select DM_MMC if MMC > select DM_SERIAL > select OF_CONTROL > imply BOARD_LATE_INIT > @@ -1286,7 +1281,6 @@ config ARCH_ZYNQ > select CPU_V7A > select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART > select DM > - select DM_MMC if MMC > select DM_SERIAL > select DM_SPI > select DM_SPI_FLASH > @@ -1315,7 +1309,6 @@ config ARCH_ZYNQMP_R5 > select CLK > select CPU_V7R > select DM > - select DM_MMC if MMC > select DM_SERIAL > select OF_CONTROL > imply CMD_DM > @@ -1329,7 +1322,6 @@ config ARCH_ZYNQMP > select DM > select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART > imply DM_MAILBOX > - select DM_MMC if MMC > select DM_SERIAL > select MTD > select DM_SPI if SPI > @@ -1397,8 +1389,8 @@ config TARGET_TOTAL_COMPUTE > select PL01X_SERIAL > select DM > select DM_SERIAL > - select DM_MMC > select DM_GPIO > + select MMC > imply OF_HAS_PRIOR_STAGE > imply MISC_INIT_R > > @@ -1904,7 +1896,7 @@ config TARGET_SL28 > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > + select MMC > select MTD > select DM_SPI_FLASH > select DM_MDIO > @@ -1945,10 +1937,10 @@ config ARCH_UNIPHIER > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_MTD > select DM_RESET > select DM_SERIAL > + select MMC > select OF_BOARD_SETUP > select OF_CONTROL > select OF_LIBFDT > @@ -1992,9 +1984,9 @@ config ARCH_STI > select BLK > select CPU_V7A > select DM > - select DM_MMC > select DM_RESET > select DM_SERIAL > + select MMC > imply CMD_DM > help > Support for STMicroelectronics STiH407/10 SoC family. > @@ -2041,7 +2033,6 @@ config ARCH_ROCKCHIP > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_PWM > select DM_REGULATOR > select DM_SERIAL > @@ -2050,6 +2041,7 @@ config ARCH_ROCKCHIP > select DM_USB_GADGET if USB_DWC3_GADGET > select ENABLE_ARM_SOC_BOOT0_HOOK > select OF_CONTROL > + select MMC > select MTD > select SPI > select SPL_DM if SPL > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 3fee5a4299b8..7e6959510087 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -19,7 +19,7 @@ config ARCH_EXYNOS4 > select BOARD_EARLY_INIT_F > select CPU_V7A > select BLK > - select DM_MMC > + select MMC > help > Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There > are multiple SoCs in this family including Exynos4210, > Exynos4412, > @@ -40,7 +40,7 @@ config ARCH_EXYNOS5 > imply USB_ETHER_RTL8152 > imply USB_ETHER_SMSC95XX > select BLK > - select DM_MMC > + select MMC > > help > Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and > @@ -52,7 +52,7 @@ config ARCH_EXYNOS7 > select ARM64 > select BOARD_EARLY_INIT_F > select BLK > - select DM_MMC > + select MMC > help > Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or > Cortex-A53 CPU (and some in a big.LITTLE configuration). There > are > @@ -62,7 +62,7 @@ config ARCH_EXYNOS9 > bool "Exynos9 SoC family" > select ARM64 > select BLK > - select DM_MMC > + select MMC > help > Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There > are > multiple SoCs in this family including Exynos850. > diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig > index d282663dcf1f..4d1e07b14d32 100644 > --- a/arch/arm/mach-imx/mx5/Kconfig > +++ b/arch/arm/mach-imx/mx5/Kconfig > @@ -26,9 +26,9 @@ config TARGET_KP_IMX53 > select DM_I2C > select DM_PMIC > select DM_SERIAL > - select DM_MMC > select BLK > select DM_REGULATOR > + select MMC > select MX53 > imply CMD_DM > > diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig > index 1f8022ee6853..4020e16d92dc 100644 > --- a/arch/arm/mach-imx/mx6/Kconfig > +++ b/arch/arm/mach-imx/mx6/Kconfig > @@ -81,8 +81,8 @@ config MX6UL_OPOS6UL > select BOARD_LATE_INIT > select DM > select DM_GPIO > - select DM_MMC > select DM_THERMAL > + select MMC > select SPL_DM if SPL > select SPL_OF_CONTROL if SPL > select SPL_PINCTRL if SPL > @@ -176,9 +176,9 @@ config TARGET_DART_6UL > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_SERIAL > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_DHCOMIMX6 > @@ -197,10 +197,10 @@ config TARGET_DISPLAY5 > depends on MX6Q > select DM > select DM_I2C > - select DM_MMC > select DM_SPI > select DM_GPIO > select DM_SERIAL > + select MMC > select MTD > select SUPPORT_SPL > imply CMD_DM > @@ -245,7 +245,7 @@ config TARGET_KOSAGI_NOVENA > bool "Kosagi Novena" > select BOARD_LATE_INIT > select DM_GPIO > - select DM_MMC > + select MMC > select PCI > select SCSI > select VIDEO > @@ -280,8 +280,8 @@ config TARGET_MX6LOGICPD > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_PMIC > + select MMC > select OF_CONTROL > imply CMD_DM > > @@ -300,10 +300,10 @@ config TARGET_MX6DL_MAMOJ > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_PMIC > select DM_PMIC_PFUZE100 > select DM_THERMAL > + select MMC > select OF_CONTROL > select PINCTRL > select SPL > @@ -332,8 +332,8 @@ config TARGET_MX6Q_ENGICAM > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_THERMAL > + select MMC > select OF_CONTROL > select SPL_DM if SPL > select SPL_OF_CONTROL if SPL > @@ -352,8 +352,8 @@ config TARGET_MX6Q_ACC > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_MX6S_SIELAFF > @@ -453,8 +453,8 @@ config TARGET_MX6UL_ENGICAM > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_THERMAL > + select MMC > select OF_CONTROL > select SPL_DM if SPL > select SPL_OF_CONTROL if SPL > @@ -490,9 +490,9 @@ config TARGET_MYS_6ULX > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_SERIAL > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_NITROGEN6X > @@ -507,10 +507,10 @@ config TARGET_NPI_IMX6ULL > bool "Seeed NPI-IMX6ULL" > depends on MX6ULL > select DM > - select DM_MMC > select DM_GPIO > select DM_SERIAL > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_OPOS6ULDEV > @@ -566,9 +566,9 @@ config TARGET_PCL063 > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_SERIAL > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_PCL063_ULL > @@ -577,9 +577,9 @@ config TARGET_PCL063_ULL > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_SERIAL > select DM_THERMAL > + select MMC > select SUPPORT_SPL > > config TARGET_SOMLABS_VISIONSOM_6ULL > @@ -588,9 +588,9 @@ config TARGET_SOMLABS_VISIONSOM_6ULL > select BOARD_LATE_INIT > select DM > select DM_GPIO > - select DM_MMC > select DM_SERIAL > select DM_THERMAL > + select MMC > imply CMD_DM > > config TARGET_TBS2910 > @@ -605,7 +605,7 @@ config TARGET_KP_IMX6Q_TPC > select DM > select SPL_DM if SPL > select DM_THERMAL > - select DM_MMC > + select MMC > select DM_REGULATOR > select SPL_DM_REGULATOR if SPL > select DM_SERIAL > @@ -673,7 +673,7 @@ config TARGET_BRPPT2 > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > + select MMC > select SUPPORT_SPL > select SPL_DM if SPL > select SPL_OF_CONTROL if SPL > diff --git a/arch/arm/mach-omap2/omap3/Kconfig > b/arch/arm/mach-omap2/omap3/Kconfig > index f15f44fe7d4b..a175e5ce6edc 100644 > --- a/arch/arm/mach-omap2/omap3/Kconfig > +++ b/arch/arm/mach-omap2/omap3/Kconfig > @@ -30,8 +30,8 @@ config TARGET_AM3517_EVM > select DM > select DM_GPIO > select DM_I2C > - select DM_MMC > select DM_SERIAL > + select MMC > imply CMD_DM > > config TARGET_CM_T35 > diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig > index b6a4b0b653fb..b15b2e7b6a01 100644 > --- a/arch/arm/mach-s5pc1xx/Kconfig > +++ b/arch/arm/mach-s5pc1xx/Kconfig > @@ -8,8 +8,8 @@ config TARGET_S5P_GONI > bool "S5P Goni board" > select OF_CONTROL > select BLK > - select DM_MMC > select MISC_COMMON > + select MMC > > config TARGET_SMDKC100 > bool "Support smdkc100 board" > diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig > index 04612895576a..78b89729f191 100644 > --- a/arch/arm/mach-tegra/Kconfig > +++ b/arch/arm/mach-tegra/Kconfig > @@ -48,13 +48,13 @@ config TEGRA_COMMON > select DM_GPIO > select DM_I2C > select DM_KEYBOARD > - select DM_MMC > select DM_PWM > select DM_RESET > select DM_SERIAL > select DM_SPI > select DM_SPI_FLASH > select MISC > + select MMC > select MTD > select OF_CONTROL > select SPI > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index 9f2fecce3826..46513db0d6e3 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -3,7 +3,7 @@ menu "MMC Host controller Support" > config MMC > bool "MMC/SD/SDIO card support" > default ARM || PPC || SANDBOX > - select DM_MMC if DM > + select DM_MMC > help > This selects MultiMediaCard, Secure Digital and Secure > Digital I/O support. > @@ -39,14 +39,14 @@ config MMC_BROKEN_CD > If card detection feature is broken, just poll to detect. > > config DM_MMC > - bool "Enable MMC controllers using Driver Model" > + bool > depends on DM > help > - This enables the MultiMediaCard (MMC) uclass which supports MMC > and > - Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, > etc.) > - and non-removable (e.g. eMMC chip) devices are supported. These > - appear as block devices in U-Boot and can support filesystems > such > - as EXT4 and FAT. > + This enables the MultiMediaCard (MMC) driver model uclass which > + supports MMC and Secure Digital I/O (SDIO) cards. Both removable > (SD, > + micro-SD, etc.) and non-removable (e.g. eMMC chip) devices are > + supported. These appear as block devices in U-Boot and can > support > + filesystems such as EXT4 and FAT. > > config SPL_DM_MMC > bool "Enable MMC controllers using Driver Model in SPL" > @@ -79,7 +79,7 @@ config MMC_SDHCI_ADMA_HELPERS > > config MMC_SPI > bool "Support for SPI-based MMC controller" > - depends on DM_MMC && DM_SPI > + depends on DM_SPI > help > This selects SPI-based MMC controllers. > If you have an MMC controller on a SPI bus, say Y here. > @@ -97,7 +97,6 @@ config MMC_SPI_CRC_ON > > config ARM_PL180_MMCI > bool "ARM AMBA Multimedia Card Interface and compatible support" > - depends on DM_MMC > help > This selects the ARM(R) AMBA(R) PrimeCell Multimedia Card > Interface (PL180, PL181 and compatible) support. > @@ -258,7 +257,6 @@ config MMC_DW > > config MMC_DW_CORTINA > bool "Cortina specific extensions for Synopsys DW Memory Card > Interface" > - depends on DM_MMC > depends on MMC_DW > help > This selects support for Cortina SoC specific extensions to the > @@ -285,7 +283,7 @@ config MMC_DW_K3 > > config MMC_DW_ROCKCHIP > bool "Rockchip SD/MMC controller support" > - depends on DM_MMC && OF_CONTROL > + depends on OF_CONTROL > depends on MMC_DW > help > This enables support for the Rockchip SD/MMM controller, which is > @@ -306,7 +304,6 @@ config MMC_DW_SOCFPGA > config MMC_DW_SNPS > bool "Extensions for DW Memory Card Interface used in Synopsys ARC > devboards" > depends on MMC_DW > - depends on DM_MMC > depends on OF_CONTROL > depends on CLK > help > @@ -317,13 +314,12 @@ config NEXELL_DWMMC > bool "Nexell SD/MMC controller support" > depends on ARCH_NEXELL > depends on MMC_DW > - depends on DM_MMC > depends on PINCTRL_NEXELL > default y > > config MMC_MESON_GX > bool "Meson GX EMMC controller support" > - depends on DM_MMC && ARCH_MESON > + depends on ARCH_MESON > help > Support for EMMC host controller on Meson GX ARM SoCs platform > (S905) > > @@ -338,7 +334,7 @@ config MMC_MXC > > config MMC_OWL > bool "Actions OWL Multimedia Card Interface support" > - depends on ARCH_OWL && DM_MMC > + depends on ARCH_OWL > help > This selects the OWL SD/MMC host controller found on board > based on Actions S700/S900 SoC. > @@ -366,7 +362,6 @@ config MMC_PCI > config MMC_OCTEONTX > bool "Marvell Octeon Multimedia Card Interface support" > depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) > - depends on DM_MMC > select MMC_SUPPORTS_TUNING if ARCH_OCTEONTX2 > help > This selects the Octeon Multimedia card Interface. > @@ -377,7 +372,7 @@ config MMC_OCTEONTX > > config MVEBU_MMC > bool "Kirkwood MMC controller support" > - depends on DM_MMC && ARCH_KIRKWOOD > + depends on ARCH_KIRKWOOD > help > Support for MMC host controller on Kirkwood SoCs. > If you are on a Kirkwood architecture, say Y here. > @@ -386,8 +381,7 @@ config MVEBU_MMC > > config MMC_OMAP_HS > bool "TI OMAP High Speed Multimedia Card Interface support" > - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR > - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR > + select DM_REGULATOR_PBIAS if DM_REGULATOR > help > This selects the TI OMAP High Speed Multimedia card Interface. > If you have an omap2plus board with a Multimedia Card slot, > @@ -430,7 +424,6 @@ config SH_MMCIF > config MMC_UNIPHIER > bool "UniPhier SD/MMC Host Controller support" > depends on ARCH_UNIPHIER > - depends on DM_MMC > depends on OF_CONTROL > help > This selects support for the Matsushita SD/MMC Host Controller on > @@ -439,7 +432,6 @@ config MMC_UNIPHIER > config RENESAS_SDHI > bool "Renesas R-Car SD/MMC Host Controller support" > depends on ARCH_RENESAS > - depends on DM_MMC > depends on OF_CONTROL > select BOUNCE_BUFFER > help > @@ -449,7 +441,6 @@ config RENESAS_SDHI > config MMC_BCM2835 > bool "BCM2835 family custom SD/MMC Host Controller support" > depends on ARCH_BCM283X > - depends on DM_MMC > depends on OF_CONTROL > default y > help > @@ -469,7 +460,7 @@ config JZ47XX_MMC > config MMC_SANDBOX > bool "Sandbox MMC support" > depends on SANDBOX > - depends on DM_MMC && OF_CONTROL > + depends on 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 > @@ -559,7 +550,6 @@ config FIXED_SDHCI_ALIGNED_BUFFER > config MMC_SDHCI_ASPEED > bool "Aspeed SDHCI controller" > depends on ARCH_ASPEED > - depends on DM_MMC > depends on MMC_SDHCI > select MISC > help > @@ -571,7 +561,7 @@ config MMC_SDHCI_ASPEED > config MMC_SDHCI_ATMEL > bool "Atmel SDHCI controller support" > depends on ARCH_AT91 > - depends on DM_MMC && ARCH_AT91 > + depends on ARCH_AT91 > depends on MMC_SDHCI > help > This enables support for the Atmel SDHCI controller, which > supports > @@ -606,7 +596,6 @@ config MMC_SDHCI_BCMSTB > > config MMC_SDHCI_CADENCE > bool "SDHCI support for the Cadence SD/SDIO/eMMC controller" > - depends on DM_MMC > depends on MMC_SDHCI > depends on OF_CONTROL > help > @@ -618,7 +607,6 @@ config MMC_SDHCI_CADENCE > > config MMC_SDHCI_CV1800B > bool "SDHCI support for the CV1800B SD/SDIO/eMMC controller" > - depends on DM_MMC > depends on MMC_SDHCI > depends on OF_CONTROL > help > @@ -633,7 +621,7 @@ config MMC_SDHCI_AM654 > bool "SDHCI Controller on TI's Am654 devices" > depends on ARCH_K3 > depends on MMC_SDHCI > - depends on DM_MMC && OF_CONTROL > + depends on OF_CONTROL > depends on REGMAP > select MMC_SDHCI_IO_ACCESSORS > help > @@ -653,7 +641,6 @@ config MMC_SDHCI_IPROC > > config MMC_SDHCI_F_SDH30 > bool "SDHCI support for Fujitsu Semiconductor/Socionext F_SDH30" > - depends on DM_MMC > depends on MMC_SDHCI > help > This selects the Secure Digital Host Controller Interface (SDHCI) > @@ -673,7 +660,6 @@ config MMC_SDHCI_KONA > > config MMC_SDHCI_MSM > bool "Qualcomm SDHCI controller" > - depends on DM_MMC > depends on MMC_SDHCI > help > Enables support for SDHCI 2.0 controller present on some Qualcomm > @@ -685,7 +671,6 @@ config MMC_SDHCI_MV > bool "SDHCI support on Marvell platform" > depends on ARCH_MVEBU > depends on MMC_SDHCI > - depends on DM_MMC > help > This selects the Secure Digital Host Controller Interface on > Marvell platform. > @@ -697,7 +682,6 @@ config MMC_SDHCI_MV > config MMC_SDHCI_NPCM > bool "SDHCI support on Nuvoton NPCM device" > depends on MMC_SDHCI > - depends on DM_MMC > help > This selects the Secure Digital Host Controller Interface (SDHCI) > on Nuvoton NPCM device. > @@ -708,7 +692,7 @@ config MMC_SDHCI_NPCM > > config MMC_SDHCI_PIC32 > bool "Microchip PIC32 on-chip SDHCI support" > - depends on DM_MMC && MACH_PIC32 > + depends on MACH_PIC32 > depends on MMC_SDHCI > help > Support for Microchip PIC32 SDHCI controller. > @@ -716,7 +700,6 @@ config MMC_SDHCI_PIC32 > config MMC_SDHCI_ROCKCHIP > bool "Arasan SDHCI controller for Rockchip support" > depends on ARCH_ROCKCHIP > - depends on DM_MMC > depends on MMC_SDHCI > help > Support for Arasan SDHCI host controller on Rockchip ARM SoCs > platform > @@ -735,7 +718,6 @@ config MMC_SDHCI_S5P > config MMC_SDHCI_SNPS > bool "Synopsys DesignWare SDHCI controller" > depends on MMC_SDHCI > - depends on DM_MMC > help > Support for DesignWare SDHCI host controller on Alibaba TH1520 > SoC. > This is a highly configurable and programmable, high performance > @@ -753,7 +735,7 @@ config MMC_SDHCI_STI > > config MMC_SDHCI_XENON > bool "SDHCI support for the Xenon SDHCI controller" > - depends on MMC_SDHCI && DM_MMC && OF_CONTROL > + depends on MMC_SDHCI && OF_CONTROL > help > Support for Xenon SDHCI host controller on Marvell Armada 3700 > 7k/8k ARM SoCs platforms > @@ -764,7 +746,6 @@ config MMC_SDHCI_XENON > > config MMC_SDHCI_TANGIER > bool "Tangier SDHCI controller support" > - depends on DM_MMC > depends on MMC_SDHCI > help > This selects support for SDHCI controller on Tanginer > @@ -800,7 +781,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK > > config MMC_SDHCI_ZYNQ > bool "Arasan SDHCI controller support" > - depends on DM_MMC && OF_CONTROL > + depends on OF_CONTROL > depends on MMC_SDHCI > help > Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs > platform > @@ -842,7 +823,6 @@ config MMC_SUNXI_HAS_MODE_SWITCH > > config MMC_PITON > bool "MMC support for OpenPiton SoC" > - depends on DM_MMC > help > This selects support for the SD host controller on OpenPiton SoC. > Note that this SD controller directly exposes the contents of the > @@ -851,7 +831,7 @@ config MMC_PITON > > config GENERIC_ATMEL_MCI > bool "Atmel Multimedia Card Interface support" > - depends on DM_MMC && ARCH_AT91 > + depends on ARCH_AT91 > help > This enables support for Atmel High Speed Multimedia Card > Interface > (HSMCI), which supports the MultiMedia Card (MMC) Specification > V4.3, > @@ -860,7 +840,7 @@ config GENERIC_ATMEL_MCI > > config STM32_SDMMC2 > bool "STMicroelectronics STM32H7 SD/MMC Host Controller support" > - depends on DM_MMC && OF_CONTROL > + depends on 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, > @@ -880,7 +860,6 @@ config FTSDC010_SDIO > config MMC_MTK > bool "MediaTek SD/MMC Card Interface support" > depends on ARCH_MEDIATEK || ARCH_MTMIPS > - depends on DM_MMC > depends on OF_CONTROL > help > This selects the MediaTek(R) Secure digital and Multimedia card > Interface. > @@ -911,7 +890,7 @@ config FSL_ESDHC_SUPPORT_ADMA2 > > config FSL_ESDHC_33V_IO_RELIABILITY_WORKAROUND > bool "enable eSDHC workaround for 3.3v IO reliability issue" > - depends on FSL_ESDHC && DM_MMC > + depends on FSL_ESDHC > help > When eSDHC operates at 3.3v, damage can accumulate in an internal > level shifter at a higher than expected rate. The faster the > interface > -- > 2.43.0 > > ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol 2024-12-20 22:22 ` [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini 2024-12-23 18:26 ` Peter Robinson @ 2025-01-14 13:43 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 1 sibling, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-14 13:43 UTC (permalink / raw) To: Tom Rini, u-boot Cc: NXP i.MX U-Boot Team, Fabio Estevam, Minkyu Kang, Rayagonda Kokatanur, Stefano Babic, Svyatoslav Ryhel, Thierry Reding Hi Tom, On 12/20/24 11:22 PM, Tom Rini wrote: > At this point in time, DM is always enabled. So if MMC is enabled, it > should select DM_MMC. No drivers need to depend on DM_MMC being enabled > now, so remove that from dependency lists. This now means that a number > of platforms which select'd DM_MMC need to select MMC instead. > > Signed-off-by: Tom Rini <trini@konsulko.com> > --- > Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com> > Cc: Fabio Estevam <festevam@gmail.com> > Cc: Minkyu Kang <mk7.kang@samsung.com> > Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> > Cc: Stefano Babic <sbabic@denx.de> > Cc: Svyatoslav Ryhel <clamor95@gmail.com> > Cc: Thierry Reding <treding@nvidia.com> > --- > arch/Kconfig | 2 +- > arch/arm/Kconfig | 18 +++------ > arch/arm/mach-exynos/Kconfig | 8 ++-- > arch/arm/mach-imx/mx5/Kconfig | 2 +- > arch/arm/mach-imx/mx6/Kconfig | 32 +++++++-------- > arch/arm/mach-omap2/omap3/Kconfig | 2 +- > arch/arm/mach-s5pc1xx/Kconfig | 2 +- > arch/arm/mach-tegra/Kconfig | 2 +- > drivers/mmc/Kconfig | 65 +++++++++++-------------------- > 9 files changed, 52 insertions(+), 81 deletions(-) > > diff --git a/arch/Kconfig b/arch/Kconfig > index 6258788f53ff..44ae4b3babdf 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -172,13 +172,13 @@ config SANDBOX > select DM_GPIO > select DM_I2C > select DM_KEYBOARD > - select DM_MMC > select DM_SERIAL > select DM_SPI > select DM_SPI_FLASH > select GZIP_COMPRESSED > select IO_TRACE > select LZO > + select MMC > select MTD > select OF_BOARD_SETUP > select PCI_ENDPOINT > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index ea414fe376a8..ea256f687867 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1163,7 +1163,6 @@ config ARCH_SUNXI > select DM_SPI if SPI > select DM_SPI_FLASH if SPI && MTD > select DM_KEYBOARD > - select DM_MMC if MMC > select DM_SERIAL > select OF_BOARD_SETUP > select OF_CONTROL > @@ -1211,7 +1210,6 @@ config ARCH_U8500 > select CPU_V7A > select DM I guess this can be removed in may places since it defaults to y and we are relying on it being set to y? [...] > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index 9f2fecce3826..46513db0d6e3 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -3,7 +3,7 @@ menu "MMC Host controller Support" > config MMC > bool "MMC/SD/SDIO card support" > default ARM || PPC || SANDBOX > - select DM_MMC if DM > + select DM_MMC > help > This selects MultiMediaCard, Secure Digital and Secure > Digital I/O support. > @@ -39,14 +39,14 @@ config MMC_BROKEN_CD > If card detection feature is broken, just poll to detect. > > config DM_MMC > - bool "Enable MMC controllers using Driver Model" > + bool > depends on DM We can probably remove this depends on as well since DM is implied? Generally, I'm wondering why we are even keeping this symbol and not merging MMC and DM_MMC together? This is not a blocker for this change though, we can go babysteps :) Looks ok to me otherwise. Cheers, Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol 2025-01-14 13:43 ` Quentin Schulz @ 2025-01-14 16:58 ` Tom Rini 0 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-14 16:58 UTC (permalink / raw) To: Quentin Schulz Cc: u-boot, NXP i.MX U-Boot Team, Fabio Estevam, Minkyu Kang, Rayagonda Kokatanur, Stefano Babic, Svyatoslav Ryhel, Thierry Reding [-- Attachment #1: Type: text/plain, Size: 1928 bytes --] On Tue, Jan 14, 2025 at 02:43:44PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 12/20/24 11:22 PM, Tom Rini wrote: > > At this point in time, DM is always enabled. So if MMC is enabled, it > > should select DM_MMC. No drivers need to depend on DM_MMC being enabled > > now, so remove that from dependency lists. This now means that a number > > of platforms which select'd DM_MMC need to select MMC instead. > > > > Signed-off-by: Tom Rini <trini@konsulko.com> [snip] > > @@ -1211,7 +1210,6 @@ config ARCH_U8500 > > select CPU_V7A > > select DM > > I guess this can be removed in may places since it defaults to y and we are > relying on it being set to y? Yes, a clean-up to remove "select DM" would be good. This dates back to before everyone was converted. > [...] > > > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > > index 9f2fecce3826..46513db0d6e3 100644 > > --- a/drivers/mmc/Kconfig > > +++ b/drivers/mmc/Kconfig > > @@ -3,7 +3,7 @@ menu "MMC Host controller Support" > > config MMC > > bool "MMC/SD/SDIO card support" > > default ARM || PPC || SANDBOX > > - select DM_MMC if DM > > + select DM_MMC > > help > > This selects MultiMediaCard, Secure Digital and Secure > > Digital I/O support. > > @@ -39,14 +39,14 @@ config MMC_BROKEN_CD > > If card detection feature is broken, just poll to detect. > > config DM_MMC > > - bool "Enable MMC controllers using Driver Model" > > + bool > > depends on DM > > We can probably remove this depends on as well since DM is implied? Correct. > Generally, I'm wondering why we are even keeping this symbol and not merging > MMC and DM_MMC together? This is not a blocker for this change though, we > can go babysteps :) What makes merging MMC and DM_MMC somewhat tricky is that DM is not required in SPL/TPL. So yeah, small steps here is the way forward. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH 3/6] efi_loader: Depend on BLK 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini 2024-12-20 22:22 ` [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-20 22:50 ` Heinrich Schuchardt 2024-12-20 22:22 ` [PATCH 4/6] blk: Make block subsystems select BLK Tom Rini ` (3 subsequent siblings) 6 siblings, 1 reply; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot; +Cc: Heinrich Schuchardt, Ilias Apalodimas In reworking the BLK usage in Kconfig, I found there's a few issues with EFI_LOADER=y and BLK=n. In general, we can easily say that lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK. That however leaves the bootmgr code, eficonfig code and then parts of efi_device_path.c, efi_boottime.c and efi_setup.c which functionally depend on BLK. While these calls can be if'd out, I'm unsure if the result is usable. So rather than leave that buildable and imply that it is, I'm leaving that combination non-buildable and commenting that EFI_LOADER depends on BLK in the Kconfig currently. Signed-off-by: Tom Rini <trini@konsulko.com> --- Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> --- lib/efi_loader/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c46ffe3a9d89..798dced475e0 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -8,13 +8,14 @@ config EFI_LOADER SYS_CPU = armv7 || \ SYS_CPU = armv8) || \ X86 || RISCV || SANDBOX) + # We have not fully removed the requirement for some block device + depends on BLK # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB 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 !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 -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 3/6] efi_loader: Depend on BLK 2024-12-20 22:22 ` [PATCH 3/6] efi_loader: Depend on BLK Tom Rini @ 2024-12-20 22:50 ` Heinrich Schuchardt 0 siblings, 0 replies; 38+ messages in thread From: Heinrich Schuchardt @ 2024-12-20 22:50 UTC (permalink / raw) To: Tom Rini, u-boot; +Cc: Ilias Apalodimas Am 20. Dezember 2024 23:22:19 MEZ schrieb Tom Rini <trini@konsulko.com>: >In reworking the BLK usage in Kconfig, I found there's a few issues with >EFI_LOADER=y and BLK=n. In general, we can easily say that >lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK. >That however leaves the bootmgr code, eficonfig code and then parts of >efi_device_path.c, efi_boottime.c and efi_setup.c which functionally >depend on BLK. While these calls can be if'd out, I'm unsure if the >result is usable. So rather than leave that buildable and imply that it >is, I'm leaving that combination non-buildable and commenting that >EFI_LOADER depends on BLK in the Kconfig currently. EFI booting using only PXE or HTTP should be possible. But I admit we did not work on support for diskless devices, yet. > >Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> >--- >Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> >Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> >--- > lib/efi_loader/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig >index c46ffe3a9d89..798dced475e0 100644 >--- a/lib/efi_loader/Kconfig >+++ b/lib/efi_loader/Kconfig >@@ -8,13 +8,14 @@ config EFI_LOADER > SYS_CPU = armv7 || \ > SYS_CPU = armv8) || \ > X86 || RISCV || SANDBOX) >+ # We have not fully removed the requirement for some block device >+ depends on BLK > # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB > 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 !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 ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH 4/6] blk: Make block subsystems select BLK 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (2 preceding siblings ...) 2024-12-20 22:22 ` [PATCH 3/6] efi_loader: Depend on BLK Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-23 18:31 ` Peter Robinson 2025-01-14 13:45 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 5/6] mtd: Correct dependency of BLK Tom Rini ` (2 subsequent siblings) 6 siblings, 2 replies; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot The BLK symbol has a few meanings, one of which is that it controls the driver model portion of a "block device". Rather than having this hidden symbol be "default y if ..." it should be select'd by the various block subsystems. Signed-off-by: Tom Rini <trini@konsulko.com> --- drivers/ata/Kconfig | 2 ++ drivers/block/Kconfig | 7 +++---- drivers/mmc/Kconfig | 1 + drivers/nvme/Kconfig | 1 + drivers/scsi/Kconfig | 1 + drivers/usb/Kconfig | 1 + drivers/virtio/Kconfig | 1 + 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 4fbb63a148ac..29ceab849c02 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -1,6 +1,7 @@ config AHCI bool "Support SATA controllers with driver model" depends on DM + select BLK help This enables a uclass for disk controllers in U-Boot. Various driver types can use this, such as AHCI/SATA. It does not provide any standard @@ -9,6 +10,7 @@ config AHCI config SATA bool "Support SATA controllers" + select BLK help This enables support for SATA (Serial Advanced Technology Attachment), a serial bus standard for connecting to hard drives and diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 5283d8981e09..cc75bad02b8c 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -1,8 +1,5 @@ config BLK - bool # "Support block devices" - depends on DM - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK + bool help Enable support for block devices, such as SCSI, MMC and USB flash sticks. These provide a block-level interface which permits @@ -100,6 +97,7 @@ config TPL_BLOCK_CACHE config EFI_MEDIA bool "Support EFI media drivers" default y if EFI || SANDBOX + select BLK help Enable this to support media devices on top of UEFI. This enables just the uclass so you also need a specific driver to make this do @@ -139,6 +137,7 @@ endif # EFI_MEDIA config IDE bool "Support IDE controllers" + select BLK help Enables support for IDE (Integrated Drive Electronics) hard drives. This allows access to raw blocks and filesystems on an IDE drive diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 46513db0d6e3..4827834b4aab 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -3,6 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX + select BLK select DM_MMC help This selects MultiMediaCard, Secure Digital and Secure diff --git a/drivers/nvme/Kconfig b/drivers/nvme/Kconfig index 73edb3551606..d138867666bd 100644 --- a/drivers/nvme/Kconfig +++ b/drivers/nvme/Kconfig @@ -4,6 +4,7 @@ config NVME bool "NVM Express device support" + select BLK help This option enables support for NVM Express devices. It supports basic functions of NVMe (read/write). diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 7e21c4ae2bb8..fc87d34cca39 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1,5 +1,6 @@ config SCSI bool "Support SCSI controllers with driver model" + select BLK help This enables support for SCSI (Small Computer System Interface), a parallel interface widely used with storage peripherals such as diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 960b6a906ac4..99c6649e4178 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -1,5 +1,6 @@ menuconfig USB bool "USB support" + select BLK ---help--- Universal Serial Bus (USB) is a specification for a serial bus subsystem which offers higher speeds and more features than the diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 1de68867d52e..512ac376f185 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -64,6 +64,7 @@ config VIRTIO_NET config VIRTIO_BLK bool "virtio block driver" depends on VIRTIO + select BLK help This is the virtual block driver for virtio. It can be used with QEMU based targets. -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 4/6] blk: Make block subsystems select BLK 2024-12-20 22:22 ` [PATCH 4/6] blk: Make block subsystems select BLK Tom Rini @ 2024-12-23 18:31 ` Peter Robinson 2024-12-23 18:53 ` Tom Rini 2025-01-14 13:45 ` Quentin Schulz 1 sibling, 1 reply; 38+ messages in thread From: Peter Robinson @ 2024-12-23 18:31 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot On Fri, 20 Dec 2024 at 22:36, Tom Rini <trini@konsulko.com> wrote: > The BLK symbol has a few meanings, one of which is that it controls the > driver model portion of a "block device". Rather than having this hidden > symbol be "default y if ..." it should be select'd by the various block > subsystems. > > Signed-off-by: Tom Rini <trini@konsulko.com> > Just a minor query against the USB change, other than that the rest looks fine. Reviewed-by: Peter Robinson <pbrobinson@gmail.com> > --- > drivers/ata/Kconfig | 2 ++ > drivers/block/Kconfig | 7 +++---- > drivers/mmc/Kconfig | 1 + > drivers/nvme/Kconfig | 1 + > drivers/scsi/Kconfig | 1 + > drivers/usb/Kconfig | 1 + > drivers/virtio/Kconfig | 1 + > 7 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig > index 4fbb63a148ac..29ceab849c02 100644 > --- a/drivers/ata/Kconfig > +++ b/drivers/ata/Kconfig > @@ -1,6 +1,7 @@ > config AHCI > bool "Support SATA controllers with driver model" > depends on DM > + select BLK > help > This enables a uclass for disk controllers in U-Boot. Various > driver > types can use this, such as AHCI/SATA. It does not provide any > standard > @@ -9,6 +10,7 @@ config AHCI > > config SATA > bool "Support SATA controllers" > + select BLK > help > This enables support for SATA (Serial Advanced Technology > Attachment), a serial bus standard for connecting to hard drives > and > diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig > index 5283d8981e09..cc75bad02b8c 100644 > --- a/drivers/block/Kconfig > +++ b/drivers/block/Kconfig > @@ -1,8 +1,5 @@ > config BLK > - bool # "Support block devices" > - depends on DM > - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA > - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK > + bool > help > Enable support for block devices, such as SCSI, MMC and USB > flash sticks. These provide a block-level interface which permits > @@ -100,6 +97,7 @@ config TPL_BLOCK_CACHE > config EFI_MEDIA > bool "Support EFI media drivers" > default y if EFI || SANDBOX > + select BLK > help > Enable this to support media devices on top of UEFI. This enables > just the uclass so you also need a specific driver to make this > do > @@ -139,6 +137,7 @@ endif # EFI_MEDIA > > config IDE > bool "Support IDE controllers" > + select BLK > help > Enables support for IDE (Integrated Drive Electronics) hard > drives. > This allows access to raw blocks and filesystems on an IDE drive > diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig > index 46513db0d6e3..4827834b4aab 100644 > --- a/drivers/mmc/Kconfig > +++ b/drivers/mmc/Kconfig > @@ -3,6 +3,7 @@ menu "MMC Host controller Support" > config MMC > bool "MMC/SD/SDIO card support" > default ARM || PPC || SANDBOX > + select BLK > select DM_MMC > help > This selects MultiMediaCard, Secure Digital and Secure > diff --git a/drivers/nvme/Kconfig b/drivers/nvme/Kconfig > index 73edb3551606..d138867666bd 100644 > --- a/drivers/nvme/Kconfig > +++ b/drivers/nvme/Kconfig > @@ -4,6 +4,7 @@ > > config NVME > bool "NVM Express device support" > + select BLK > help > This option enables support for NVM Express devices. > It supports basic functions of NVMe (read/write). > diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig > index 7e21c4ae2bb8..fc87d34cca39 100644 > --- a/drivers/scsi/Kconfig > +++ b/drivers/scsi/Kconfig > @@ -1,5 +1,6 @@ > config SCSI > bool "Support SCSI controllers with driver model" > + select BLK > help > This enables support for SCSI (Small Computer System Interface), > a parallel interface widely used with storage peripherals such as > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig > index 960b6a906ac4..99c6649e4178 100644 > --- a/drivers/usb/Kconfig > +++ b/drivers/usb/Kconfig > @@ -1,5 +1,6 @@ > menuconfig USB > bool "USB support" > + select BLK > Shouldn't this be against USB_STORAGE further down the file? > ---help--- > Universal Serial Bus (USB) is a specification for a serial bus > subsystem which offers higher speeds and more features than the > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig > index 1de68867d52e..512ac376f185 100644 > --- a/drivers/virtio/Kconfig > +++ b/drivers/virtio/Kconfig > @@ -64,6 +64,7 @@ config VIRTIO_NET > config VIRTIO_BLK > bool "virtio block driver" > depends on VIRTIO > + select BLK > help > This is the virtual block driver for virtio. It can be used with > QEMU based targets. > -- > 2.43.0 > > ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 4/6] blk: Make block subsystems select BLK 2024-12-23 18:31 ` Peter Robinson @ 2024-12-23 18:53 ` Tom Rini 0 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2024-12-23 18:53 UTC (permalink / raw) To: Peter Robinson, Marek Vasut, Mattijs Korpershoek; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 1266 bytes --] On Mon, Dec 23, 2024 at 06:31:58PM +0000, Peter Robinson wrote: > On Fri, 20 Dec 2024 at 22:36, Tom Rini <trini@konsulko.com> wrote: > > > The BLK symbol has a few meanings, one of which is that it controls the > > driver model portion of a "block device". Rather than having this hidden > > symbol be "default y if ..." it should be select'd by the various block > > subsystems. > > > > Signed-off-by: Tom Rini <trini@konsulko.com> > > > > Just a minor query against the USB change, other than that the rest looks > fine. [snip] > > diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig > > index 960b6a906ac4..99c6649e4178 100644 > > --- a/drivers/usb/Kconfig > > +++ b/drivers/usb/Kconfig > > @@ -1,5 +1,6 @@ > > menuconfig USB > > bool "USB support" > > + select BLK > > > > Shouldn't this be against USB_STORAGE further down the file? So, this is a 1:1 translation of what we have today. That said, it likely could be done at the USB_STORAGE level for USB host, and USB_FUNCTION_MASS_STORAGE for gadget (the entry for CMD_USB_MASS_STORAGE is depends on BLK) ? I was slightly worried about opening up a number of problems if I poked too hard on this area and didn't want the series to get too big. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 4/6] blk: Make block subsystems select BLK 2024-12-20 22:22 ` [PATCH 4/6] blk: Make block subsystems select BLK Tom Rini 2024-12-23 18:31 ` Peter Robinson @ 2025-01-14 13:45 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 1 sibling, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-14 13:45 UTC (permalink / raw) To: Tom Rini, u-boot Hi Tom, On 12/20/24 11:22 PM, Tom Rini wrote: > The BLK symbol has a few meanings, one of which is that it controls the > driver model portion of a "block device". Rather than having this hidden > symbol be "default y if ..." it should be select'd by the various block > subsystems. > > Signed-off-by: Tom Rini <trini@konsulko.com> > --- > drivers/ata/Kconfig | 2 ++ > drivers/block/Kconfig | 7 +++---- > drivers/mmc/Kconfig | 1 + > drivers/nvme/Kconfig | 1 + > drivers/scsi/Kconfig | 1 + > drivers/usb/Kconfig | 1 + > drivers/virtio/Kconfig | 1 + > 7 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig > index 4fbb63a148ac..29ceab849c02 100644 > --- a/drivers/ata/Kconfig > +++ b/drivers/ata/Kconfig > @@ -1,6 +1,7 @@ > config AHCI > bool "Support SATA controllers with driver model" > depends on DM > + select BLK > help > This enables a uclass for disk controllers in U-Boot. Various driver > types can use this, such as AHCI/SATA. It does not provide any standard > @@ -9,6 +10,7 @@ config AHCI > > config SATA > bool "Support SATA controllers" > + select BLK > help > This enables support for SATA (Serial Advanced Technology > Attachment), a serial bus standard for connecting to hard drives and > diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig > index 5283d8981e09..cc75bad02b8c 100644 > --- a/drivers/block/Kconfig > +++ b/drivers/block/Kconfig > @@ -1,8 +1,5 @@ > config BLK > - bool # "Support block devices" > - depends on DM > - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA > - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK I believe you missed adding a select BLK for the PVBLOCK symbol? Looks good to me otherwise, I was actually confused as to why we used def_bool instead of select (see what it prompted in my comment for patch 1 :) ). Cheers, Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 4/6] blk: Make block subsystems select BLK 2025-01-14 13:45 ` Quentin Schulz @ 2025-01-14 16:58 ` Tom Rini 2025-01-15 17:38 ` Quentin Schulz 0 siblings, 1 reply; 38+ messages in thread From: Tom Rini @ 2025-01-14 16:58 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 2091 bytes --] On Tue, Jan 14, 2025 at 02:45:25PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 12/20/24 11:22 PM, Tom Rini wrote: > > The BLK symbol has a few meanings, one of which is that it controls the > > driver model portion of a "block device". Rather than having this hidden > > symbol be "default y if ..." it should be select'd by the various block > > subsystems. > > > > Signed-off-by: Tom Rini <trini@konsulko.com> > > --- > > drivers/ata/Kconfig | 2 ++ > > drivers/block/Kconfig | 7 +++---- > > drivers/mmc/Kconfig | 1 + > > drivers/nvme/Kconfig | 1 + > > drivers/scsi/Kconfig | 1 + > > drivers/usb/Kconfig | 1 + > > drivers/virtio/Kconfig | 1 + > > 7 files changed, 10 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig > > index 4fbb63a148ac..29ceab849c02 100644 > > --- a/drivers/ata/Kconfig > > +++ b/drivers/ata/Kconfig > > @@ -1,6 +1,7 @@ > > config AHCI > > bool "Support SATA controllers with driver model" > > depends on DM > > + select BLK > > help > > This enables a uclass for disk controllers in U-Boot. Various driver > > types can use this, such as AHCI/SATA. It does not provide any standard > > @@ -9,6 +10,7 @@ config AHCI > > config SATA > > bool "Support SATA controllers" > > + select BLK > > help > > This enables support for SATA (Serial Advanced Technology > > Attachment), a serial bus standard for connecting to hard drives and > > diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig > > index 5283d8981e09..cc75bad02b8c 100644 > > --- a/drivers/block/Kconfig > > +++ b/drivers/block/Kconfig > > @@ -1,8 +1,5 @@ > > config BLK > > - bool # "Support block devices" > > - depends on DM > > - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA > > - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK > > I believe you missed adding a select BLK for the PVBLOCK symbol? In this case, PVBLOCK was one of the few (as it's newer) symbols that was doing this correctly. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 4/6] blk: Make block subsystems select BLK 2025-01-14 16:58 ` Tom Rini @ 2025-01-15 17:38 ` Quentin Schulz 0 siblings, 0 replies; 38+ messages in thread From: Quentin Schulz @ 2025-01-15 17:38 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot Hi Tom, On 1/14/25 5:58 PM, Tom Rini wrote: > On Tue, Jan 14, 2025 at 02:45:25PM +0100, Quentin Schulz wrote: >> Hi Tom, >> >> On 12/20/24 11:22 PM, Tom Rini wrote: >>> The BLK symbol has a few meanings, one of which is that it controls the >>> driver model portion of a "block device". Rather than having this hidden >>> symbol be "default y if ..." it should be select'd by the various block >>> subsystems. >>> >>> Signed-off-by: Tom Rini <trini@konsulko.com> >>> --- >>> drivers/ata/Kconfig | 2 ++ >>> drivers/block/Kconfig | 7 +++---- >>> drivers/mmc/Kconfig | 1 + >>> drivers/nvme/Kconfig | 1 + >>> drivers/scsi/Kconfig | 1 + >>> drivers/usb/Kconfig | 1 + >>> drivers/virtio/Kconfig | 1 + >>> 7 files changed, 10 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig >>> index 4fbb63a148ac..29ceab849c02 100644 >>> --- a/drivers/ata/Kconfig >>> +++ b/drivers/ata/Kconfig >>> @@ -1,6 +1,7 @@ >>> config AHCI >>> bool "Support SATA controllers with driver model" >>> depends on DM >>> + select BLK >>> help >>> This enables a uclass for disk controllers in U-Boot. Various driver >>> types can use this, such as AHCI/SATA. It does not provide any standard >>> @@ -9,6 +10,7 @@ config AHCI >>> config SATA >>> bool "Support SATA controllers" >>> + select BLK >>> help >>> This enables support for SATA (Serial Advanced Technology >>> Attachment), a serial bus standard for connecting to hard drives and >>> diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig >>> index 5283d8981e09..cc75bad02b8c 100644 >>> --- a/drivers/block/Kconfig >>> +++ b/drivers/block/Kconfig >>> @@ -1,8 +1,5 @@ >>> config BLK >>> - bool # "Support block devices" >>> - depends on DM >>> - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA >>> - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK >> >> I believe you missed adding a select BLK for the PVBLOCK symbol? > > In this case, PVBLOCK was one of the few (as it's newer) symbols that > was doing this correctly. > Indeed! Would have been nice to mention that is was not an oversight in the commit log :) Cheers, Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH 5/6] mtd: Correct dependency of BLK 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (3 preceding siblings ...) 2024-12-20 22:22 ` [PATCH 4/6] blk: Make block subsystems select BLK Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-23 18:27 ` Peter Robinson 2025-01-14 13:46 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 6/6] block: Remove "select BLK" from non-block drivers Tom Rini 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 6 siblings, 2 replies; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot; +Cc: Heiko Schocher, Kyungmin Park, Michael Trimarchi In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as they provide block device functionality and not depending on some other block device already being enabled too (as is the typical case). Signed-off-by: Tom Rini <trini@konsulko.com> --- Cc: Heiko Schocher <hs@denx.de> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Michael Trimarchi <michael@amarulasolutions.com> --- drivers/mtd/Kconfig | 2 +- drivers/mtd/ubi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 678bbde89e68..df178665f9bc 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -34,7 +34,7 @@ config MTD_CONCAT config MTD_BLOCK bool "Enable block device access to MTD devices" - depends on BLK + select BLK help Enable support for block device access to MTD devices using blk_ops abstraction. diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index c027d898a640..ba77c0347365 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig @@ -116,7 +116,7 @@ config MTD_UBI_FM_DEBUG config UBI_BLOCK bool "Enable UBI block device support" - depends on BLK + select BLK help Enable UBI block device support using blk_ops abstraction. -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 5/6] mtd: Correct dependency of BLK 2024-12-20 22:22 ` [PATCH 5/6] mtd: Correct dependency of BLK Tom Rini @ 2024-12-23 18:27 ` Peter Robinson 2025-01-14 13:46 ` Quentin Schulz 1 sibling, 0 replies; 38+ messages in thread From: Peter Robinson @ 2024-12-23 18:27 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot, Heiko Schocher, Kyungmin Park, Michael Trimarchi On Fri, 20 Dec 2024 at 22:36, Tom Rini <trini@konsulko.com> wrote: > In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as > they provide block device functionality and not depending on some other > block device already being enabled too (as is the typical case). > > Signed-off-by: Tom Rini <trini@konsulko.com> > Reviewed-by: Peter Robinson <pbrobinson@gmail.com> > --- > Cc: Heiko Schocher <hs@denx.de> > Cc: Kyungmin Park <kmpark@infradead.org> > Cc: Michael Trimarchi <michael@amarulasolutions.com> > --- > drivers/mtd/Kconfig | 2 +- > drivers/mtd/ubi/Kconfig | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig > index 678bbde89e68..df178665f9bc 100644 > --- a/drivers/mtd/Kconfig > +++ b/drivers/mtd/Kconfig > @@ -34,7 +34,7 @@ config MTD_CONCAT > > config MTD_BLOCK > bool "Enable block device access to MTD devices" > - depends on BLK > + select BLK > help > Enable support for block device access to MTD devices > using blk_ops abstraction. > diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig > index c027d898a640..ba77c0347365 100644 > --- a/drivers/mtd/ubi/Kconfig > +++ b/drivers/mtd/ubi/Kconfig > @@ -116,7 +116,7 @@ config MTD_UBI_FM_DEBUG > > config UBI_BLOCK > bool "Enable UBI block device support" > - depends on BLK > + select BLK > help > Enable UBI block device support using blk_ops abstraction. > > -- > 2.43.0 > > ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 5/6] mtd: Correct dependency of BLK 2024-12-20 22:22 ` [PATCH 5/6] mtd: Correct dependency of BLK Tom Rini 2024-12-23 18:27 ` Peter Robinson @ 2025-01-14 13:46 ` Quentin Schulz 1 sibling, 0 replies; 38+ messages in thread From: Quentin Schulz @ 2025-01-14 13:46 UTC (permalink / raw) To: Tom Rini, u-boot; +Cc: Heiko Schocher, Kyungmin Park, Michael Trimarchi Hi Tom, On 12/20/24 11:22 PM, Tom Rini wrote: > In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as > they provide block device functionality and not depending on some other > block device already being enabled too (as is the typical case). > > Signed-off-by: Tom Rini <trini@konsulko.com> Makes sense to me, Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks! Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (4 preceding siblings ...) 2024-12-20 22:22 ` [PATCH 5/6] mtd: Correct dependency of BLK Tom Rini @ 2024-12-20 22:22 ` Tom Rini 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:53 ` Quentin Schulz 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 6 siblings, 2 replies; 38+ messages in thread From: Tom Rini @ 2024-12-20 22:22 UTC (permalink / raw) To: u-boot Now that block drivers are all selecting the BLK symbol, there's no need for other options to be select'ing BLK so that other required functionality can be enabled. Remove these places. Signed-off-by: Tom Rini <trini@konsulko.com> --- arch/arm/Kconfig | 4 ---- arch/arm/mach-exynos/Kconfig | 4 ---- arch/arm/mach-imx/mx5/Kconfig | 2 +- arch/arm/mach-s5pc1xx/Kconfig | 1 - 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ea256f687867..86b37e8d5f8d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1371,7 +1371,6 @@ config ARCH_VEXPRESS64 select PL01X_SERIAL select OF_CONTROL select CLK - select BLK select MTD_NOR_FLASH if MTD select FLASH_CFI_DRIVER if MTD select ENV_IS_IN_FLASH if MTD @@ -1981,7 +1980,6 @@ config ARCH_STM32 config ARCH_STI bool "Support STMicroelectronics SoCs" - select BLK select CPU_V7A select DM select DM_RESET @@ -2028,7 +2026,6 @@ config ARCH_STM32MP config ARCH_ROCKCHIP bool "Support Rockchip SoCs" - select BLK select BINMAN if SPL_OPTEE || SPL select DM select DM_GPIO @@ -2116,7 +2113,6 @@ config TARGET_POMELO select AHCI select SCSI_AHCI select AHCI_PCI - select BLK select PCI select DM_PCI select SCSI diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 7e6959510087..28193039cb84 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -18,7 +18,6 @@ config ARCH_EXYNOS4 bool "Exynos4 SoC family" select BOARD_EARLY_INIT_F select CPU_V7A - select BLK select MMC help Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There @@ -39,7 +38,6 @@ config ARCH_EXYNOS5 imply USB_ETHER_ASIX imply USB_ETHER_RTL8152 imply USB_ETHER_SMSC95XX - select BLK select MMC help @@ -51,7 +49,6 @@ config ARCH_EXYNOS7 bool "Exynos7 SoC family" select ARM64 select BOARD_EARLY_INIT_F - select BLK select MMC help Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or @@ -61,7 +58,6 @@ config ARCH_EXYNOS7 config ARCH_EXYNOS9 bool "Exynos9 SoC family" select ARM64 - select BLK select MMC help Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There are diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig index 4d1e07b14d32..0dfd68496875 100644 --- a/arch/arm/mach-imx/mx5/Kconfig +++ b/arch/arm/mach-imx/mx5/Kconfig @@ -26,7 +26,7 @@ config TARGET_KP_IMX53 select DM_I2C select DM_PMIC select DM_SERIAL - select BLK + select DM_MMC select DM_REGULATOR select MMC select MX53 diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig index b15b2e7b6a01..d8b85f80e631 100644 --- a/arch/arm/mach-s5pc1xx/Kconfig +++ b/arch/arm/mach-s5pc1xx/Kconfig @@ -7,7 +7,6 @@ choice config TARGET_S5P_GONI bool "S5P Goni board" select OF_CONTROL - select BLK select MISC_COMMON select MMC -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2024-12-20 22:22 ` [PATCH 6/6] block: Remove "select BLK" from non-block drivers Tom Rini @ 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:53 ` Quentin Schulz 1 sibling, 0 replies; 38+ messages in thread From: Peter Robinson @ 2024-12-23 18:26 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot On Fri, 20 Dec 2024 at 22:27, Tom Rini <trini@konsulko.com> wrote: > Now that block drivers are all selecting the BLK symbol, there's no need > for other options to be select'ing BLK so that other required > functionality can be enabled. Remove these places. > > Signed-off-by: Tom Rini <trini@konsulko.com> > Reviewed-by: Peter Robinson <pbrobinson@gmail.com> > --- > arch/arm/Kconfig | 4 ---- > arch/arm/mach-exynos/Kconfig | 4 ---- > arch/arm/mach-imx/mx5/Kconfig | 2 +- > arch/arm/mach-s5pc1xx/Kconfig | 1 - > 4 files changed, 1 insertion(+), 10 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index ea256f687867..86b37e8d5f8d 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1371,7 +1371,6 @@ config ARCH_VEXPRESS64 > select PL01X_SERIAL > select OF_CONTROL > select CLK > - select BLK > select MTD_NOR_FLASH if MTD > select FLASH_CFI_DRIVER if MTD > select ENV_IS_IN_FLASH if MTD > @@ -1981,7 +1980,6 @@ config ARCH_STM32 > > config ARCH_STI > bool "Support STMicroelectronics SoCs" > - select BLK > select CPU_V7A > select DM > select DM_RESET > @@ -2028,7 +2026,6 @@ config ARCH_STM32MP > > config ARCH_ROCKCHIP > bool "Support Rockchip SoCs" > - select BLK > select BINMAN if SPL_OPTEE || SPL > select DM > select DM_GPIO > @@ -2116,7 +2113,6 @@ config TARGET_POMELO > select AHCI > select SCSI_AHCI > select AHCI_PCI > - select BLK > select PCI > select DM_PCI > select SCSI > diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig > index 7e6959510087..28193039cb84 100644 > --- a/arch/arm/mach-exynos/Kconfig > +++ b/arch/arm/mach-exynos/Kconfig > @@ -18,7 +18,6 @@ config ARCH_EXYNOS4 > bool "Exynos4 SoC family" > select BOARD_EARLY_INIT_F > select CPU_V7A > - select BLK > select MMC > help > Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There > @@ -39,7 +38,6 @@ config ARCH_EXYNOS5 > imply USB_ETHER_ASIX > imply USB_ETHER_RTL8152 > imply USB_ETHER_SMSC95XX > - select BLK > select MMC > > help > @@ -51,7 +49,6 @@ config ARCH_EXYNOS7 > bool "Exynos7 SoC family" > select ARM64 > select BOARD_EARLY_INIT_F > - select BLK > select MMC > help > Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or > @@ -61,7 +58,6 @@ config ARCH_EXYNOS7 > config ARCH_EXYNOS9 > bool "Exynos9 SoC family" > select ARM64 > - select BLK > select MMC > help > Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There > are > diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig > index 4d1e07b14d32..0dfd68496875 100644 > --- a/arch/arm/mach-imx/mx5/Kconfig > +++ b/arch/arm/mach-imx/mx5/Kconfig > @@ -26,7 +26,7 @@ config TARGET_KP_IMX53 > select DM_I2C > select DM_PMIC > select DM_SERIAL > - select BLK > + select DM_MMC > select DM_REGULATOR > select MMC > select MX53 > diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig > index b15b2e7b6a01..d8b85f80e631 100644 > --- a/arch/arm/mach-s5pc1xx/Kconfig > +++ b/arch/arm/mach-s5pc1xx/Kconfig > @@ -7,7 +7,6 @@ choice > config TARGET_S5P_GONI > bool "S5P Goni board" > select OF_CONTROL > - select BLK > select MISC_COMMON > select MMC > > -- > 2.43.0 > > ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2024-12-20 22:22 ` [PATCH 6/6] block: Remove "select BLK" from non-block drivers Tom Rini 2024-12-23 18:26 ` Peter Robinson @ 2025-01-14 13:53 ` Quentin Schulz 2025-01-14 16:59 ` Tom Rini 1 sibling, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-14 13:53 UTC (permalink / raw) To: Tom Rini, u-boot Hi Tom, On 12/20/24 11:22 PM, Tom Rini wrote: > Now that block drivers are all selecting the BLK symbol, there's no need > for other options to be select'ing BLK so that other required > functionality can be enabled. Remove these places. > We have multiple commands depending on the BLK symbol. BOOTSTD also depends on it, but I assume we should be able to network boot without HW block drivers? CMD_UFETCH wouldn't be usable without those drivers as well. Should we do something about that by making them not depend on BLK e.g. use CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on those archs have at least one HW block driver enabled. I guess checking if all .config before and after that change are identical would help us figure out if this could introduce a regression? Cheers, Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2025-01-14 13:53 ` Quentin Schulz @ 2025-01-14 16:59 ` Tom Rini 2025-01-15 17:49 ` Quentin Schulz 0 siblings, 1 reply; 38+ messages in thread From: Tom Rini @ 2025-01-14 16:59 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 1660 bytes --] On Tue, Jan 14, 2025 at 02:53:48PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 12/20/24 11:22 PM, Tom Rini wrote: > > Now that block drivers are all selecting the BLK symbol, there's no need > > for other options to be select'ing BLK so that other required > > functionality can be enabled. Remove these places. > > > > We have multiple commands depending on the BLK symbol. Yes. > BOOTSTD also depends on it, but I assume we should be able to network boot > without HW block drivers? Correct. That's part of the motivation for this series (which I wasn't clear enough about on its own). Without something like this series if we remove the BLK dependency from BOOTSTD then some other platforms fail to build or grow a bunch in size (as BOOTSTD is default y and now it's enabled on those platforms). > CMD_UFETCH wouldn't be usable without those drivers as well. > > Should we do something about that by making them not depend on BLK e.g. use > CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on > those archs have at least one HW block driver enabled. I guess checking if > all .config before and after that change are identical would help us figure > out if this could introduce a regression? There's a few options, depending on what the command is. For CMD_UFETCH it's likely that a small restructure would be needed to not try and print block devices while preserving the rest of the formatting. For CMD_LSBLK / CMD_CLONE it's an unfortunate short-hand for "some block device exists" which is functionally what those commands require. Thanks for reviewing the whole series. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2025-01-14 16:59 ` Tom Rini @ 2025-01-15 17:49 ` Quentin Schulz 2025-01-15 20:20 ` Tom Rini 0 siblings, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-15 17:49 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot Hi Tom, On 1/14/25 5:59 PM, Tom Rini wrote: > On Tue, Jan 14, 2025 at 02:53:48PM +0100, Quentin Schulz wrote: >> Hi Tom, >> >> On 12/20/24 11:22 PM, Tom Rini wrote: >>> Now that block drivers are all selecting the BLK symbol, there's no need >>> for other options to be select'ing BLK so that other required >>> functionality can be enabled. Remove these places. >>> >> >> We have multiple commands depending on the BLK symbol. > > Yes. > >> BOOTSTD also depends on it, but I assume we should be able to network boot >> without HW block drivers? > > Correct. That's part of the motivation for this series (which I wasn't > clear enough about on its own). Without something like this series if we > remove the BLK dependency from BOOTSTD then some other platforms fail to > build or grow a bunch in size (as BOOTSTD is default y and now it's > enabled on those platforms). > >> CMD_UFETCH wouldn't be usable without those drivers as well. >> >> Should we do something about that by making them not depend on BLK e.g. use >> CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on >> those archs have at least one HW block driver enabled. I guess checking if >> all .config before and after that change are identical would help us figure >> out if this could introduce a regression? > > There's a few options, depending on what the command is. For CMD_UFETCH > it's likely that a small restructure would be needed to not try and My point is that I believe this patch is too hastily removing the select BLK because some symbols have "depends on BLK" and by removing the select, we make those symbols unselectable. This can cascade if other symbols depend on those now unselectable symbols. Also, removing the select BLK from architecture/target symbols can introduce regressions if BLK really is required? I think a reasonable (albeit cumbersome) solution is to migrate all those selects to the impacted defconfigs so that effectively no change is made for existing devices. If maintainers want to remove BLK, they could then do it later. This also makes sure that BOOTSTD and CMD_UFETCH (and others) are still enabled, since BLK would still be enabled, just from a different location. Then another patch series could remove BOOTSTD dependency on BLK by adapting the code, same for CMD_UFETCH (and others). Does this make sense? Am I missing something? > print block devices while preserving the rest of the formatting. For > CMD_LSBLK / CMD_CLONE it's an unfortunate short-hand for "some block > device exists" which is functionally what those commands require. > Yes, we need to keep the depends on BLK for those. Cheers, Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2025-01-15 17:49 ` Quentin Schulz @ 2025-01-15 20:20 ` Tom Rini 2025-01-16 9:21 ` Quentin Schulz 0 siblings, 1 reply; 38+ messages in thread From: Tom Rini @ 2025-01-15 20:20 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 3218 bytes --] On Wed, Jan 15, 2025 at 06:49:45PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 1/14/25 5:59 PM, Tom Rini wrote: > > On Tue, Jan 14, 2025 at 02:53:48PM +0100, Quentin Schulz wrote: > > > Hi Tom, > > > > > > On 12/20/24 11:22 PM, Tom Rini wrote: > > > > Now that block drivers are all selecting the BLK symbol, there's no need > > > > for other options to be select'ing BLK so that other required > > > > functionality can be enabled. Remove these places. > > > > > > > > > > We have multiple commands depending on the BLK symbol. > > > > Yes. > > > > > BOOTSTD also depends on it, but I assume we should be able to network boot > > > without HW block drivers? > > > > Correct. That's part of the motivation for this series (which I wasn't > > clear enough about on its own). Without something like this series if we > > remove the BLK dependency from BOOTSTD then some other platforms fail to > > build or grow a bunch in size (as BOOTSTD is default y and now it's > > enabled on those platforms). > > > > > CMD_UFETCH wouldn't be usable without those drivers as well. > > > > > > Should we do something about that by making them not depend on BLK e.g. use > > > CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on > > > those archs have at least one HW block driver enabled. I guess checking if > > > all .config before and after that change are identical would help us figure > > > out if this could introduce a regression? > > > > There's a few options, depending on what the command is. For CMD_UFETCH > > it's likely that a small restructure would be needed to not try and > > My point is that I believe this patch is too hastily removing the select BLK > because some symbols have "depends on BLK" and by removing the select, we > make those symbols unselectable. This can cascade if other symbols depend on > those now unselectable symbols. > > Also, removing the select BLK from architecture/target symbols can introduce > regressions if BLK really is required? > > I think a reasonable (albeit cumbersome) solution is to migrate all those > selects to the impacted defconfigs so that effectively no change is made for > existing devices. If maintainers want to remove BLK, they could then do it > later. > > This also makes sure that BOOTSTD and CMD_UFETCH (and others) are still > enabled, since BLK would still be enabled, just from a different location. > Then another patch series could remove BOOTSTD dependency on BLK by adapting > the code, same for CMD_UFETCH (and others). > > Does this make sense? Am I missing something? What you're missing, I believe, is that this patch exists because prior to the first patch in the series and also going back to when BLK was optional, if something higher level like ARCH_ROCKCHIP didn't select BLK then it wouldn't be able to prompt about its MMC driver. This is similar to all of the high level places that "select DM" as that used to be meaningful but now it's not. As part of testing the series I did my world build before/after and the only change is that as noted in the cover letter, espresso7420 now has MMC again. Does this help? Thanks. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2025-01-15 20:20 ` Tom Rini @ 2025-01-16 9:21 ` Quentin Schulz 2025-01-16 14:33 ` Tom Rini 0 siblings, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-16 9:21 UTC (permalink / raw) To: Tom Rini; +Cc: u-boot Hi Tom, On 1/15/25 9:20 PM, Tom Rini wrote: > On Wed, Jan 15, 2025 at 06:49:45PM +0100, Quentin Schulz wrote: >> Hi Tom, >> >> On 1/14/25 5:59 PM, Tom Rini wrote: >>> On Tue, Jan 14, 2025 at 02:53:48PM +0100, Quentin Schulz wrote: >>>> Hi Tom, >>>> >>>> On 12/20/24 11:22 PM, Tom Rini wrote: >>>>> Now that block drivers are all selecting the BLK symbol, there's no need >>>>> for other options to be select'ing BLK so that other required >>>>> functionality can be enabled. Remove these places. >>>>> >>>> >>>> We have multiple commands depending on the BLK symbol. >>> >>> Yes. >>> >>>> BOOTSTD also depends on it, but I assume we should be able to network boot >>>> without HW block drivers? >>> >>> Correct. That's part of the motivation for this series (which I wasn't >>> clear enough about on its own). Without something like this series if we >>> remove the BLK dependency from BOOTSTD then some other platforms fail to >>> build or grow a bunch in size (as BOOTSTD is default y and now it's >>> enabled on those platforms). >>> >>>> CMD_UFETCH wouldn't be usable without those drivers as well. >>>> >>>> Should we do something about that by making them not depend on BLK e.g. use >>>> CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on >>>> those archs have at least one HW block driver enabled. I guess checking if >>>> all .config before and after that change are identical would help us figure >>>> out if this could introduce a regression? >>> >>> There's a few options, depending on what the command is. For CMD_UFETCH >>> it's likely that a small restructure would be needed to not try and >> >> My point is that I believe this patch is too hastily removing the select BLK >> because some symbols have "depends on BLK" and by removing the select, we >> make those symbols unselectable. This can cascade if other symbols depend on >> those now unselectable symbols. >> >> Also, removing the select BLK from architecture/target symbols can introduce >> regressions if BLK really is required? >> >> I think a reasonable (albeit cumbersome) solution is to migrate all those >> selects to the impacted defconfigs so that effectively no change is made for >> existing devices. If maintainers want to remove BLK, they could then do it >> later. >> >> This also makes sure that BOOTSTD and CMD_UFETCH (and others) are still >> enabled, since BLK would still be enabled, just from a different location. >> Then another patch series could remove BOOTSTD dependency on BLK by adapting >> the code, same for CMD_UFETCH (and others). >> >> Does this make sense? Am I missing something? > > What you're missing, I believe, is that this patch exists because prior > to the first patch in the series and also going back to when BLK was > optional, if something higher level like ARCH_ROCKCHIP didn't select BLK > then it wouldn't be able to prompt about its MMC driver. This is similar > to all of the high level places that "select DM" as that used to be > meaningful but now it's not. As part of testing the series I did my > world build before/after and the only change is that as noted in the > cover letter, espresso7420 now has MMC again. Does this help? Thanks. > Please add this to the patch commit log as well. The cover letter content doesn't make it to the git history :) But with the world build you've done, I'm now confident what I was worried about will not happen, therefore: Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks! Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCH 6/6] block: Remove "select BLK" from non-block drivers 2025-01-16 9:21 ` Quentin Schulz @ 2025-01-16 14:33 ` Tom Rini 0 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-16 14:33 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot [-- Attachment #1: Type: text/plain, Size: 3979 bytes --] On Thu, Jan 16, 2025 at 10:21:36AM +0100, Quentin Schulz wrote: > Hi Tom, > > On 1/15/25 9:20 PM, Tom Rini wrote: > > On Wed, Jan 15, 2025 at 06:49:45PM +0100, Quentin Schulz wrote: > > > Hi Tom, > > > > > > On 1/14/25 5:59 PM, Tom Rini wrote: > > > > On Tue, Jan 14, 2025 at 02:53:48PM +0100, Quentin Schulz wrote: > > > > > Hi Tom, > > > > > > > > > > On 12/20/24 11:22 PM, Tom Rini wrote: > > > > > > Now that block drivers are all selecting the BLK symbol, there's no need > > > > > > for other options to be select'ing BLK so that other required > > > > > > functionality can be enabled. Remove these places. > > > > > > > > > > > > > > > > We have multiple commands depending on the BLK symbol. > > > > > > > > Yes. > > > > > > > > > BOOTSTD also depends on it, but I assume we should be able to network boot > > > > > without HW block drivers? > > > > > > > > Correct. That's part of the motivation for this series (which I wasn't > > > > clear enough about on its own). Without something like this series if we > > > > remove the BLK dependency from BOOTSTD then some other platforms fail to > > > > build or grow a bunch in size (as BOOTSTD is default y and now it's > > > > enabled on those platforms). > > > > > > > > > CMD_UFETCH wouldn't be usable without those drivers as well. > > > > > > > > > > Should we do something about that by making them not depend on BLK e.g. use > > > > > CONFIG_IS_ENABLED in the right places? Not sure if all devicess based on > > > > > those archs have at least one HW block driver enabled. I guess checking if > > > > > all .config before and after that change are identical would help us figure > > > > > out if this could introduce a regression? > > > > > > > > There's a few options, depending on what the command is. For CMD_UFETCH > > > > it's likely that a small restructure would be needed to not try and > > > > > > My point is that I believe this patch is too hastily removing the select BLK > > > because some symbols have "depends on BLK" and by removing the select, we > > > make those symbols unselectable. This can cascade if other symbols depend on > > > those now unselectable symbols. > > > > > > Also, removing the select BLK from architecture/target symbols can introduce > > > regressions if BLK really is required? > > > > > > I think a reasonable (albeit cumbersome) solution is to migrate all those > > > selects to the impacted defconfigs so that effectively no change is made for > > > existing devices. If maintainers want to remove BLK, they could then do it > > > later. > > > > > > This also makes sure that BOOTSTD and CMD_UFETCH (and others) are still > > > enabled, since BLK would still be enabled, just from a different location. > > > Then another patch series could remove BOOTSTD dependency on BLK by adapting > > > the code, same for CMD_UFETCH (and others). > > > > > > Does this make sense? Am I missing something? > > > > What you're missing, I believe, is that this patch exists because prior > > to the first patch in the series and also going back to when BLK was > > optional, if something higher level like ARCH_ROCKCHIP didn't select BLK > > then it wouldn't be able to prompt about its MMC driver. This is similar > > to all of the high level places that "select DM" as that used to be > > meaningful but now it's not. As part of testing the series I did my > > world build before/after and the only change is that as noted in the > > cover letter, espresso7420 now has MMC again. Does this help? Thanks. > > > > Please add this to the patch commit log as well. The cover letter content > doesn't make it to the git history :) > > But with the world build you've done, I'm now confident what I was worried > about will not happen, therefore: > > Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks, I'll reword this slightly to include the above when applying. -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (5 preceding siblings ...) 2024-12-20 22:22 ` [PATCH 6/6] block: Remove "select BLK" from non-block drivers Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini ` (6 more replies) 6 siblings, 7 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot Hey all, One problem we have today is how the BLK symbol is set and used in Kconfig files. Part of the challenge is that we use it as a gating symbol for "we have a block device" and also for "enable block device library code". What this series does is move to always use "select BLK" by block drivers (a few were and a few others had it the inverse) and then "depends on BLK" for functionality that needs a block device present. The end result of this series is that a number of platforms which had disabled EFI_LOADER now don't ask for it (they have no block device) and espresso7420 has a regression about MMC support fixed. With v2 of this I've picked up the review tags from v1 and also reworded the body of the commit in the first patch. -- Tom ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCHv2 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini ` (5 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Jaehoon Chung, Quentin Schulz At this point in time, we know that with the MMC symbol enabled we will always also have the BLK symbol enabled, so we do not need to list that as a dependency for MMC drivers. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> --- Changes in v2: - Reword the body of the commit to try and be clearer, requested by Quentin --- drivers/mmc/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index f4fdf15242ce..9f2fecce3826 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -338,7 +338,7 @@ config MMC_MXC config MMC_OWL bool "Actions OWL Multimedia Card Interface support" - depends on ARCH_OWL && DM_MMC && BLK + depends on ARCH_OWL && DM_MMC help This selects the OWL SD/MMC host controller found on board based on Actions S700/S900 SoC. @@ -633,7 +633,7 @@ config MMC_SDHCI_AM654 bool "SDHCI Controller on TI's Am654 devices" depends on ARCH_K3 depends on MMC_SDHCI - depends on DM_MMC && OF_CONTROL && BLK + depends on DM_MMC && OF_CONTROL depends on REGMAP select MMC_SDHCI_IO_ACCESSORS help @@ -716,7 +716,7 @@ config MMC_SDHCI_PIC32 config MMC_SDHCI_ROCKCHIP bool "Arasan SDHCI controller for Rockchip support" depends on ARCH_ROCKCHIP - depends on DM_MMC && BLK + depends on DM_MMC depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform @@ -764,7 +764,7 @@ config MMC_SDHCI_XENON config MMC_SDHCI_TANGIER bool "Tangier SDHCI controller support" - depends on DM_MMC && BLK + depends on DM_MMC depends on MMC_SDHCI help This selects support for SDHCI controller on Tanginer @@ -800,7 +800,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK config MMC_SDHCI_ZYNQ bool "Arasan SDHCI controller support" - depends on DM_MMC && OF_CONTROL && BLK + depends on DM_MMC && OF_CONTROL depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform @@ -842,7 +842,7 @@ config MMC_SUNXI_HAS_MODE_SWITCH config MMC_PITON bool "MMC support for OpenPiton SoC" - depends on DM_MMC && BLK + depends on DM_MMC help This selects support for the SD host controller on OpenPiton SoC. Note that this SD controller directly exposes the contents of the -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCHv2 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2025-01-15 1:22 ` [PATCHv2 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 3/6] efi_loader: Depend on BLK Tom Rini ` (4 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Peter Robinson At this point in time, DM is always enabled. So if MMC is enabled, it should select DM_MMC. No drivers need to depend on DM_MMC being enabled now, so remove that from dependency lists. This now means that a number of platforms which select'd DM_MMC need to select MMC instead. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> --- Changes in v2: - None. --- arch/Kconfig | 2 +- arch/arm/Kconfig | 18 +++------ arch/arm/mach-exynos/Kconfig | 8 ++-- arch/arm/mach-imx/mx5/Kconfig | 2 +- arch/arm/mach-imx/mx6/Kconfig | 32 +++++++-------- arch/arm/mach-omap2/omap3/Kconfig | 2 +- arch/arm/mach-s5pc1xx/Kconfig | 2 +- arch/arm/mach-tegra/Kconfig | 2 +- drivers/mmc/Kconfig | 65 +++++++++++-------------------- 9 files changed, 52 insertions(+), 81 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index bb2e7bedd106..14e914366593 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -180,13 +180,13 @@ config SANDBOX select DM_GPIO select DM_I2C select DM_KEYBOARD - select DM_MMC select DM_SERIAL select DM_SPI select DM_SPI_FLASH select GZIP_COMPRESSED select IO_TRACE select LZO + select MMC select MTD select OF_BOARD_SETUP select PCI_ENDPOINT diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3ed9494dfe4e..127241e608c4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1164,7 +1164,6 @@ config ARCH_SUNXI select DM_SPI if SPI select DM_SPI_FLASH if SPI && MTD select DM_KEYBOARD - select DM_MMC if MMC select DM_SERIAL select OF_BOARD_SETUP select OF_CONTROL @@ -1212,7 +1211,6 @@ config ARCH_U8500 select CPU_V7A select DM select DM_GPIO - select DM_MMC if MMC select DM_SERIAL select DM_USB_GADGET if DM_USB select OF_CONTROL @@ -1237,7 +1235,6 @@ config ARCH_VERSAL select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select GICV3 select OF_CONTROL @@ -1250,7 +1247,6 @@ config ARCH_VERSAL2 select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply BOARD_LATE_INIT @@ -1262,7 +1258,6 @@ config ARCH_VERSAL_NET select ARM64 select CLK select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply BOARD_LATE_INIT @@ -1287,7 +1282,6 @@ config ARCH_ZYNQ select CPU_V7A select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART select DM - select DM_MMC if MMC select DM_SERIAL select DM_SPI select DM_SPI_FLASH @@ -1316,7 +1310,6 @@ config ARCH_ZYNQMP_R5 select CLK select CPU_V7R select DM - select DM_MMC if MMC select DM_SERIAL select OF_CONTROL imply CMD_DM @@ -1330,7 +1323,6 @@ config ARCH_ZYNQMP select DM select DEBUG_UART_BOARD_INIT if SPL && DEBUG_UART imply DM_MAILBOX - select DM_MMC if MMC select DM_SERIAL select MTD select DM_SPI if SPI @@ -1398,8 +1390,8 @@ config TARGET_TOTAL_COMPUTE select PL01X_SERIAL select DM select DM_SERIAL - select DM_MMC select DM_GPIO + select MMC imply OF_HAS_PRIOR_STAGE imply MISC_INIT_R @@ -1905,7 +1897,7 @@ config TARGET_SL28 select DM select DM_GPIO select DM_I2C - select DM_MMC + select MMC select MTD select DM_SPI_FLASH select DM_MDIO @@ -1946,10 +1938,10 @@ config ARCH_UNIPHIER select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_MTD select DM_RESET select DM_SERIAL + select MMC select OF_BOARD_SETUP select OF_CONTROL select OF_LIBFDT @@ -1993,9 +1985,9 @@ config ARCH_STI select BLK select CPU_V7A select DM - select DM_MMC select DM_RESET select DM_SERIAL + select MMC imply CMD_DM help Support for STMicroelectronics STiH407/10 SoC family. @@ -2042,7 +2034,6 @@ config ARCH_ROCKCHIP select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PWM select DM_REGULATOR select DM_SERIAL @@ -2051,6 +2042,7 @@ config ARCH_ROCKCHIP select DM_USB_GADGET if USB_DWC3_GADGET select ENABLE_ARM_SOC_BOOT0_HOOK select OF_CONTROL + select MMC select MTD select SPI select SPL_DM if SPL diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 3fee5a4299b8..7e6959510087 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -19,7 +19,7 @@ config ARCH_EXYNOS4 select BOARD_EARLY_INIT_F select CPU_V7A select BLK - select DM_MMC + select MMC help Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There are multiple SoCs in this family including Exynos4210, Exynos4412, @@ -40,7 +40,7 @@ config ARCH_EXYNOS5 imply USB_ETHER_RTL8152 imply USB_ETHER_SMSC95XX select BLK - select DM_MMC + select MMC help Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and @@ -52,7 +52,7 @@ config ARCH_EXYNOS7 select ARM64 select BOARD_EARLY_INIT_F select BLK - select DM_MMC + select MMC help Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or Cortex-A53 CPU (and some in a big.LITTLE configuration). There are @@ -62,7 +62,7 @@ config ARCH_EXYNOS9 bool "Exynos9 SoC family" select ARM64 select BLK - select DM_MMC + select MMC help Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There are multiple SoCs in this family including Exynos850. diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig index d282663dcf1f..4d1e07b14d32 100644 --- a/arch/arm/mach-imx/mx5/Kconfig +++ b/arch/arm/mach-imx/mx5/Kconfig @@ -26,9 +26,9 @@ config TARGET_KP_IMX53 select DM_I2C select DM_PMIC select DM_SERIAL - select DM_MMC select BLK select DM_REGULATOR + select MMC select MX53 imply CMD_DM diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 1f8022ee6853..4020e16d92dc 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -81,8 +81,8 @@ config MX6UL_OPOS6UL select BOARD_LATE_INIT select DM select DM_GPIO - select DM_MMC select DM_THERMAL + select MMC select SPL_DM if SPL select SPL_OF_CONTROL if SPL select SPL_PINCTRL if SPL @@ -176,9 +176,9 @@ config TARGET_DART_6UL select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_DHCOMIMX6 @@ -197,10 +197,10 @@ config TARGET_DISPLAY5 depends on MX6Q select DM select DM_I2C - select DM_MMC select DM_SPI select DM_GPIO select DM_SERIAL + select MMC select MTD select SUPPORT_SPL imply CMD_DM @@ -245,7 +245,7 @@ config TARGET_KOSAGI_NOVENA bool "Kosagi Novena" select BOARD_LATE_INIT select DM_GPIO - select DM_MMC + select MMC select PCI select SCSI select VIDEO @@ -280,8 +280,8 @@ config TARGET_MX6LOGICPD select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PMIC + select MMC select OF_CONTROL imply CMD_DM @@ -300,10 +300,10 @@ config TARGET_MX6DL_MAMOJ select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_PMIC select DM_PMIC_PFUZE100 select DM_THERMAL + select MMC select OF_CONTROL select PINCTRL select SPL @@ -332,8 +332,8 @@ config TARGET_MX6Q_ENGICAM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -352,8 +352,8 @@ config TARGET_MX6Q_ACC select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_MX6S_SIELAFF @@ -453,8 +453,8 @@ config TARGET_MX6UL_ENGICAM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_THERMAL + select MMC select OF_CONTROL select SPL_DM if SPL select SPL_OF_CONTROL if SPL @@ -490,9 +490,9 @@ config TARGET_MYS_6ULX select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_NITROGEN6X @@ -507,10 +507,10 @@ config TARGET_NPI_IMX6ULL bool "Seeed NPI-IMX6ULL" depends on MX6ULL select DM - select DM_MMC select DM_GPIO select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_OPOS6ULDEV @@ -566,9 +566,9 @@ config TARGET_PCL063 select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_PCL063_ULL @@ -577,9 +577,9 @@ config TARGET_PCL063_ULL select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC select SUPPORT_SPL config TARGET_SOMLABS_VISIONSOM_6ULL @@ -588,9 +588,9 @@ config TARGET_SOMLABS_VISIONSOM_6ULL select BOARD_LATE_INIT select DM select DM_GPIO - select DM_MMC select DM_SERIAL select DM_THERMAL + select MMC imply CMD_DM config TARGET_TBS2910 @@ -605,7 +605,7 @@ config TARGET_KP_IMX6Q_TPC select DM select SPL_DM if SPL select DM_THERMAL - select DM_MMC + select MMC select DM_REGULATOR select SPL_DM_REGULATOR if SPL select DM_SERIAL @@ -673,7 +673,7 @@ config TARGET_BRPPT2 select DM select DM_GPIO select DM_I2C - select DM_MMC + select MMC select SUPPORT_SPL select SPL_DM if SPL select SPL_OF_CONTROL if SPL diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig index f15f44fe7d4b..a175e5ce6edc 100644 --- a/arch/arm/mach-omap2/omap3/Kconfig +++ b/arch/arm/mach-omap2/omap3/Kconfig @@ -30,8 +30,8 @@ config TARGET_AM3517_EVM select DM select DM_GPIO select DM_I2C - select DM_MMC select DM_SERIAL + select MMC imply CMD_DM config TARGET_CM_T35 diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig index b6a4b0b653fb..b15b2e7b6a01 100644 --- a/arch/arm/mach-s5pc1xx/Kconfig +++ b/arch/arm/mach-s5pc1xx/Kconfig @@ -8,8 +8,8 @@ config TARGET_S5P_GONI bool "S5P Goni board" select OF_CONTROL select BLK - select DM_MMC select MISC_COMMON + select MMC config TARGET_SMDKC100 bool "Support smdkc100 board" diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 04612895576a..78b89729f191 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -48,13 +48,13 @@ config TEGRA_COMMON select DM_GPIO select DM_I2C select DM_KEYBOARD - select DM_MMC select DM_PWM select DM_RESET select DM_SERIAL select DM_SPI select DM_SPI_FLASH select MISC + select MMC select MTD select OF_CONTROL select SPI diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 9f2fecce3826..46513db0d6e3 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -3,7 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX - select DM_MMC if DM + select DM_MMC help This selects MultiMediaCard, Secure Digital and Secure Digital I/O support. @@ -39,14 +39,14 @@ config MMC_BROKEN_CD If card detection feature is broken, just poll to detect. config DM_MMC - bool "Enable MMC controllers using Driver Model" + bool depends on DM help - This enables the MultiMediaCard (MMC) uclass which supports MMC and - Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.) - and non-removable (e.g. eMMC chip) devices are supported. These - appear as block devices in U-Boot and can support filesystems such - as EXT4 and FAT. + This enables the MultiMediaCard (MMC) driver model uclass which + supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, + micro-SD, etc.) and non-removable (e.g. eMMC chip) devices are + supported. These appear as block devices in U-Boot and can support + filesystems such as EXT4 and FAT. config SPL_DM_MMC bool "Enable MMC controllers using Driver Model in SPL" @@ -79,7 +79,7 @@ config MMC_SDHCI_ADMA_HELPERS config MMC_SPI bool "Support for SPI-based MMC controller" - depends on DM_MMC && DM_SPI + depends on DM_SPI help This selects SPI-based MMC controllers. If you have an MMC controller on a SPI bus, say Y here. @@ -97,7 +97,6 @@ config MMC_SPI_CRC_ON config ARM_PL180_MMCI bool "ARM AMBA Multimedia Card Interface and compatible support" - depends on DM_MMC help This selects the ARM(R) AMBA(R) PrimeCell Multimedia Card Interface (PL180, PL181 and compatible) support. @@ -258,7 +257,6 @@ config MMC_DW config MMC_DW_CORTINA bool "Cortina specific extensions for Synopsys DW Memory Card Interface" - depends on DM_MMC depends on MMC_DW help This selects support for Cortina SoC specific extensions to the @@ -285,7 +283,7 @@ config MMC_DW_K3 config MMC_DW_ROCKCHIP bool "Rockchip SD/MMC controller support" - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on MMC_DW help This enables support for the Rockchip SD/MMM controller, which is @@ -306,7 +304,6 @@ config MMC_DW_SOCFPGA config MMC_DW_SNPS bool "Extensions for DW Memory Card Interface used in Synopsys ARC devboards" depends on MMC_DW - depends on DM_MMC depends on OF_CONTROL depends on CLK help @@ -317,13 +314,12 @@ config NEXELL_DWMMC bool "Nexell SD/MMC controller support" depends on ARCH_NEXELL depends on MMC_DW - depends on DM_MMC depends on PINCTRL_NEXELL default y config MMC_MESON_GX bool "Meson GX EMMC controller support" - depends on DM_MMC && ARCH_MESON + depends on ARCH_MESON help Support for EMMC host controller on Meson GX ARM SoCs platform (S905) @@ -338,7 +334,7 @@ config MMC_MXC config MMC_OWL bool "Actions OWL Multimedia Card Interface support" - depends on ARCH_OWL && DM_MMC + depends on ARCH_OWL help This selects the OWL SD/MMC host controller found on board based on Actions S700/S900 SoC. @@ -366,7 +362,6 @@ config MMC_PCI config MMC_OCTEONTX bool "Marvell Octeon Multimedia Card Interface support" depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) - depends on DM_MMC select MMC_SUPPORTS_TUNING if ARCH_OCTEONTX2 help This selects the Octeon Multimedia card Interface. @@ -377,7 +372,7 @@ config MMC_OCTEONTX config MVEBU_MMC bool "Kirkwood MMC controller support" - depends on DM_MMC && ARCH_KIRKWOOD + depends on ARCH_KIRKWOOD help Support for MMC host controller on Kirkwood SoCs. If you are on a Kirkwood architecture, say Y here. @@ -386,8 +381,7 @@ config MVEBU_MMC config MMC_OMAP_HS bool "TI OMAP High Speed Multimedia Card Interface support" - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR - select DM_REGULATOR_PBIAS if DM_MMC && DM_REGULATOR + select DM_REGULATOR_PBIAS if DM_REGULATOR help This selects the TI OMAP High Speed Multimedia card Interface. If you have an omap2plus board with a Multimedia Card slot, @@ -430,7 +424,6 @@ config SH_MMCIF config MMC_UNIPHIER bool "UniPhier SD/MMC Host Controller support" depends on ARCH_UNIPHIER - depends on DM_MMC depends on OF_CONTROL help This selects support for the Matsushita SD/MMC Host Controller on @@ -439,7 +432,6 @@ config MMC_UNIPHIER config RENESAS_SDHI bool "Renesas R-Car SD/MMC Host Controller support" depends on ARCH_RENESAS - depends on DM_MMC depends on OF_CONTROL select BOUNCE_BUFFER help @@ -449,7 +441,6 @@ config RENESAS_SDHI config MMC_BCM2835 bool "BCM2835 family custom SD/MMC Host Controller support" depends on ARCH_BCM283X - depends on DM_MMC depends on OF_CONTROL default y help @@ -469,7 +460,7 @@ config JZ47XX_MMC config MMC_SANDBOX bool "Sandbox MMC support" depends on SANDBOX - depends on DM_MMC && OF_CONTROL + depends on 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 @@ -559,7 +550,6 @@ config FIXED_SDHCI_ALIGNED_BUFFER config MMC_SDHCI_ASPEED bool "Aspeed SDHCI controller" depends on ARCH_ASPEED - depends on DM_MMC depends on MMC_SDHCI select MISC help @@ -571,7 +561,7 @@ config MMC_SDHCI_ASPEED config MMC_SDHCI_ATMEL bool "Atmel SDHCI controller support" depends on ARCH_AT91 - depends on DM_MMC && ARCH_AT91 + depends on ARCH_AT91 depends on MMC_SDHCI help This enables support for the Atmel SDHCI controller, which supports @@ -606,7 +596,6 @@ config MMC_SDHCI_BCMSTB config MMC_SDHCI_CADENCE bool "SDHCI support for the Cadence SD/SDIO/eMMC controller" - depends on DM_MMC depends on MMC_SDHCI depends on OF_CONTROL help @@ -618,7 +607,6 @@ config MMC_SDHCI_CADENCE config MMC_SDHCI_CV1800B bool "SDHCI support for the CV1800B SD/SDIO/eMMC controller" - depends on DM_MMC depends on MMC_SDHCI depends on OF_CONTROL help @@ -633,7 +621,7 @@ config MMC_SDHCI_AM654 bool "SDHCI Controller on TI's Am654 devices" depends on ARCH_K3 depends on MMC_SDHCI - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on REGMAP select MMC_SDHCI_IO_ACCESSORS help @@ -653,7 +641,6 @@ config MMC_SDHCI_IPROC config MMC_SDHCI_F_SDH30 bool "SDHCI support for Fujitsu Semiconductor/Socionext F_SDH30" - depends on DM_MMC depends on MMC_SDHCI help This selects the Secure Digital Host Controller Interface (SDHCI) @@ -673,7 +660,6 @@ config MMC_SDHCI_KONA config MMC_SDHCI_MSM bool "Qualcomm SDHCI controller" - depends on DM_MMC depends on MMC_SDHCI help Enables support for SDHCI 2.0 controller present on some Qualcomm @@ -685,7 +671,6 @@ config MMC_SDHCI_MV bool "SDHCI support on Marvell platform" depends on ARCH_MVEBU depends on MMC_SDHCI - depends on DM_MMC help This selects the Secure Digital Host Controller Interface on Marvell platform. @@ -697,7 +682,6 @@ config MMC_SDHCI_MV config MMC_SDHCI_NPCM bool "SDHCI support on Nuvoton NPCM device" depends on MMC_SDHCI - depends on DM_MMC help This selects the Secure Digital Host Controller Interface (SDHCI) on Nuvoton NPCM device. @@ -708,7 +692,7 @@ config MMC_SDHCI_NPCM config MMC_SDHCI_PIC32 bool "Microchip PIC32 on-chip SDHCI support" - depends on DM_MMC && MACH_PIC32 + depends on MACH_PIC32 depends on MMC_SDHCI help Support for Microchip PIC32 SDHCI controller. @@ -716,7 +700,6 @@ config MMC_SDHCI_PIC32 config MMC_SDHCI_ROCKCHIP bool "Arasan SDHCI controller for Rockchip support" depends on ARCH_ROCKCHIP - depends on DM_MMC depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Rockchip ARM SoCs platform @@ -735,7 +718,6 @@ config MMC_SDHCI_S5P config MMC_SDHCI_SNPS bool "Synopsys DesignWare SDHCI controller" depends on MMC_SDHCI - depends on DM_MMC help Support for DesignWare SDHCI host controller on Alibaba TH1520 SoC. This is a highly configurable and programmable, high performance @@ -753,7 +735,7 @@ config MMC_SDHCI_STI config MMC_SDHCI_XENON bool "SDHCI support for the Xenon SDHCI controller" - depends on MMC_SDHCI && DM_MMC && OF_CONTROL + depends on MMC_SDHCI && OF_CONTROL help Support for Xenon SDHCI host controller on Marvell Armada 3700 7k/8k ARM SoCs platforms @@ -764,7 +746,6 @@ config MMC_SDHCI_XENON config MMC_SDHCI_TANGIER bool "Tangier SDHCI controller support" - depends on DM_MMC depends on MMC_SDHCI help This selects support for SDHCI controller on Tanginer @@ -800,7 +781,7 @@ config TEGRA124_MMC_DISABLE_EXT_LOOPBACK config MMC_SDHCI_ZYNQ bool "Arasan SDHCI controller support" - depends on DM_MMC && OF_CONTROL + depends on OF_CONTROL depends on MMC_SDHCI help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform @@ -842,7 +823,6 @@ config MMC_SUNXI_HAS_MODE_SWITCH config MMC_PITON bool "MMC support for OpenPiton SoC" - depends on DM_MMC help This selects support for the SD host controller on OpenPiton SoC. Note that this SD controller directly exposes the contents of the @@ -851,7 +831,7 @@ config MMC_PITON config GENERIC_ATMEL_MCI bool "Atmel Multimedia Card Interface support" - depends on DM_MMC && ARCH_AT91 + depends on ARCH_AT91 help This enables support for Atmel High Speed Multimedia Card Interface (HSMCI), which supports the MultiMedia Card (MMC) Specification V4.3, @@ -860,7 +840,7 @@ config GENERIC_ATMEL_MCI config STM32_SDMMC2 bool "STMicroelectronics STM32H7 SD/MMC Host Controller support" - depends on DM_MMC && OF_CONTROL + depends on 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, @@ -880,7 +860,6 @@ config FTSDC010_SDIO config MMC_MTK bool "MediaTek SD/MMC Card Interface support" depends on ARCH_MEDIATEK || ARCH_MTMIPS - depends on DM_MMC depends on OF_CONTROL help This selects the MediaTek(R) Secure digital and Multimedia card Interface. @@ -911,7 +890,7 @@ config FSL_ESDHC_SUPPORT_ADMA2 config FSL_ESDHC_33V_IO_RELIABILITY_WORKAROUND bool "enable eSDHC workaround for 3.3v IO reliability issue" - depends on FSL_ESDHC && DM_MMC + depends on FSL_ESDHC help When eSDHC operates at 3.3v, damage can accumulate in an internal level shifter at a higher than expected rate. The faster the interface -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCHv2 3/6] efi_loader: Depend on BLK 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2025-01-15 1:22 ` [PATCHv2 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini 2025-01-15 1:22 ` [PATCHv2 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 4/6] blk: Make block subsystems select BLK Tom Rini ` (3 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Heinrich Schuchardt In reworking the BLK usage in Kconfig, I found there's a few issues with EFI_LOADER=y and BLK=n. In general, we can easily say that lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK. That however leaves the bootmgr code, eficonfig code and then parts of efi_device_path.c, efi_boottime.c and efi_setup.c which functionally depend on BLK. While these calls can be if'd out, I'm unsure if the result is usable. So rather than leave that buildable and imply that it is, I'm leaving that combination non-buildable and commenting that EFI_LOADER depends on BLK in the Kconfig currently. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> --- Changes in v2: - None. --- lib/efi_loader/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index c46ffe3a9d89..798dced475e0 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -8,13 +8,14 @@ config EFI_LOADER SYS_CPU = armv7 || \ SYS_CPU = armv8) || \ X86 || RISCV || SANDBOX) + # We have not fully removed the requirement for some block device + depends on BLK # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB 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 !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 -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCHv2 4/6] blk: Make block subsystems select BLK 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (2 preceding siblings ...) 2025-01-15 1:22 ` [PATCHv2 3/6] efi_loader: Depend on BLK Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 17:51 ` Quentin Schulz 2025-01-15 1:22 ` [PATCHv2 5/6] mtd: Correct dependency of BLK Tom Rini ` (2 subsequent siblings) 6 siblings, 1 reply; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Peter Robinson The BLK symbol has a few meanings, one of which is that it controls the driver model portion of a "block device". Rather than having this hidden symbol be "default y if ..." it should be select'd by the various block subsystems. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> --- Changes in v2: - None. --- drivers/ata/Kconfig | 2 ++ drivers/block/Kconfig | 7 +++---- drivers/mmc/Kconfig | 1 + drivers/nvme/Kconfig | 1 + drivers/scsi/Kconfig | 1 + drivers/usb/Kconfig | 1 + drivers/virtio/Kconfig | 1 + 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 4fbb63a148ac..29ceab849c02 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -1,6 +1,7 @@ config AHCI bool "Support SATA controllers with driver model" depends on DM + select BLK help This enables a uclass for disk controllers in U-Boot. Various driver types can use this, such as AHCI/SATA. It does not provide any standard @@ -9,6 +10,7 @@ config AHCI config SATA bool "Support SATA controllers" + select BLK help This enables support for SATA (Serial Advanced Technology Attachment), a serial bus standard for connecting to hard drives and diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 5283d8981e09..cc75bad02b8c 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -1,8 +1,5 @@ config BLK - bool # "Support block devices" - depends on DM - def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA - def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK + bool help Enable support for block devices, such as SCSI, MMC and USB flash sticks. These provide a block-level interface which permits @@ -100,6 +97,7 @@ config TPL_BLOCK_CACHE config EFI_MEDIA bool "Support EFI media drivers" default y if EFI || SANDBOX + select BLK help Enable this to support media devices on top of UEFI. This enables just the uclass so you also need a specific driver to make this do @@ -139,6 +137,7 @@ endif # EFI_MEDIA config IDE bool "Support IDE controllers" + select BLK help Enables support for IDE (Integrated Drive Electronics) hard drives. This allows access to raw blocks and filesystems on an IDE drive diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 46513db0d6e3..4827834b4aab 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -3,6 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX + select BLK select DM_MMC help This selects MultiMediaCard, Secure Digital and Secure diff --git a/drivers/nvme/Kconfig b/drivers/nvme/Kconfig index 73edb3551606..d138867666bd 100644 --- a/drivers/nvme/Kconfig +++ b/drivers/nvme/Kconfig @@ -4,6 +4,7 @@ config NVME bool "NVM Express device support" + select BLK help This option enables support for NVM Express devices. It supports basic functions of NVMe (read/write). diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 7e21c4ae2bb8..fc87d34cca39 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1,5 +1,6 @@ config SCSI bool "Support SCSI controllers with driver model" + select BLK help This enables support for SCSI (Small Computer System Interface), a parallel interface widely used with storage peripherals such as diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 960b6a906ac4..99c6649e4178 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -1,5 +1,6 @@ menuconfig USB bool "USB support" + select BLK ---help--- Universal Serial Bus (USB) is a specification for a serial bus subsystem which offers higher speeds and more features than the diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 1de68867d52e..512ac376f185 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -64,6 +64,7 @@ config VIRTIO_NET config VIRTIO_BLK bool "virtio block driver" depends on VIRTIO + select BLK help This is the virtual block driver for virtio. It can be used with QEMU based targets. -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCHv2 4/6] blk: Make block subsystems select BLK 2025-01-15 1:22 ` [PATCHv2 4/6] blk: Make block subsystems select BLK Tom Rini @ 2025-01-15 17:51 ` Quentin Schulz 2025-01-15 18:28 ` Tom Rini 0 siblings, 1 reply; 38+ messages in thread From: Quentin Schulz @ 2025-01-15 17:51 UTC (permalink / raw) To: Tom Rini, u-boot; +Cc: Peter Robinson Hi Tom, On 1/15/25 2:22 AM, Tom Rini wrote: > The BLK symbol has a few meanings, one of which is that it controls the > driver model portion of a "block device". Rather than having this hidden > symbol be "default y if ..." it should be select'd by the various block > subsystems. > As just replied on v1, I would have liked an explicit mention that yes, this diff doesn't include a change to PVBLOCK symbol, because it already does the right thing. > Signed-off-by: Tom Rini <trini@konsulko.com> > Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Thanks! Quentin ^ permalink raw reply [flat|nested] 38+ messages in thread
* Re: [PATCHv2 4/6] blk: Make block subsystems select BLK 2025-01-15 17:51 ` Quentin Schulz @ 2025-01-15 18:28 ` Tom Rini 0 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 18:28 UTC (permalink / raw) To: Quentin Schulz; +Cc: u-boot, Peter Robinson [-- Attachment #1: Type: text/plain, Size: 735 bytes --] On Wed, Jan 15, 2025 at 06:51:28PM +0100, Quentin Schulz wrote: > Hi Tom, > > On 1/15/25 2:22 AM, Tom Rini wrote: > > The BLK symbol has a few meanings, one of which is that it controls the > > driver model portion of a "block device". Rather than having this hidden > > symbol be "default y if ..." it should be select'd by the various block > > subsystems. > > > > As just replied on v1, I would have liked an explicit mention that yes, this > diff doesn't include a change to PVBLOCK symbol, because it already does the > right thing. I thought there was another symbol or two that was correct. I'll add something to the effect of "Symbols such as PVBLOCK which already select'd BLK are unchanged". -- Tom [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 659 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [PATCHv2 5/6] mtd: Correct dependency of BLK 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (3 preceding siblings ...) 2025-01-15 1:22 ` [PATCHv2 4/6] blk: Make block subsystems select BLK Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 6/6] block: Remove "select BLK" from non-block drivers Tom Rini 2025-01-21 4:49 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Quentin Schulz In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as they provide block device functionality and not depending on some other block device already being enabled too (as is the typical case). Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> --- Changes in v2: - None. --- drivers/mtd/Kconfig | 2 +- drivers/mtd/ubi/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index c71c1e5547cc..185e83462135 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -34,7 +34,7 @@ config MTD_CONCAT config MTD_BLOCK bool "Enable block device access to MTD devices" - depends on BLK + select BLK help Enable support for block device access to MTD devices using blk_ops abstraction. diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig index c027d898a640..ba77c0347365 100644 --- a/drivers/mtd/ubi/Kconfig +++ b/drivers/mtd/ubi/Kconfig @@ -116,7 +116,7 @@ config MTD_UBI_FM_DEBUG config UBI_BLOCK bool "Enable UBI block device support" - depends on BLK + select BLK help Enable UBI block device support using blk_ops abstraction. -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [PATCHv2 6/6] block: Remove "select BLK" from non-block drivers 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (4 preceding siblings ...) 2025-01-15 1:22 ` [PATCHv2 5/6] mtd: Correct dependency of BLK Tom Rini @ 2025-01-15 1:22 ` Tom Rini 2025-01-21 4:49 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-15 1:22 UTC (permalink / raw) To: u-boot; +Cc: Peter Robinson Now that block drivers are all selecting the BLK symbol, there's no need for other options to be select'ing BLK so that other required functionality can be enabled. Remove these places. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> --- Changes in v2: - None. --- arch/arm/Kconfig | 4 ---- arch/arm/mach-exynos/Kconfig | 4 ---- arch/arm/mach-imx/mx5/Kconfig | 2 +- arch/arm/mach-s5pc1xx/Kconfig | 1 - 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 127241e608c4..314916527c9e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1372,7 +1372,6 @@ config ARCH_VEXPRESS64 select PL01X_SERIAL select OF_CONTROL select CLK - select BLK select MTD_NOR_FLASH if MTD select FLASH_CFI_DRIVER if MTD select ENV_IS_IN_FLASH if MTD @@ -1982,7 +1981,6 @@ config ARCH_STM32 config ARCH_STI bool "Support STMicroelectronics SoCs" - select BLK select CPU_V7A select DM select DM_RESET @@ -2029,7 +2027,6 @@ config ARCH_STM32MP config ARCH_ROCKCHIP bool "Support Rockchip SoCs" - select BLK select BINMAN if SPL_OPTEE || SPL select DM select DM_GPIO @@ -2117,7 +2114,6 @@ config TARGET_POMELO select AHCI select SCSI_AHCI select AHCI_PCI - select BLK select PCI select DM_PCI select SCSI diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 7e6959510087..28193039cb84 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -18,7 +18,6 @@ config ARCH_EXYNOS4 bool "Exynos4 SoC family" select BOARD_EARLY_INIT_F select CPU_V7A - select BLK select MMC help Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There @@ -39,7 +38,6 @@ config ARCH_EXYNOS5 imply USB_ETHER_ASIX imply USB_ETHER_RTL8152 imply USB_ETHER_SMSC95XX - select BLK select MMC help @@ -51,7 +49,6 @@ config ARCH_EXYNOS7 bool "Exynos7 SoC family" select ARM64 select BOARD_EARLY_INIT_F - select BLK select MMC help Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or @@ -61,7 +58,6 @@ config ARCH_EXYNOS7 config ARCH_EXYNOS9 bool "Exynos9 SoC family" select ARM64 - select BLK select MMC help Samsung Exynos9 SoC family are based on ARMv8 Cortex CPU. There are diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig index 4d1e07b14d32..0dfd68496875 100644 --- a/arch/arm/mach-imx/mx5/Kconfig +++ b/arch/arm/mach-imx/mx5/Kconfig @@ -26,7 +26,7 @@ config TARGET_KP_IMX53 select DM_I2C select DM_PMIC select DM_SERIAL - select BLK + select DM_MMC select DM_REGULATOR select MMC select MX53 diff --git a/arch/arm/mach-s5pc1xx/Kconfig b/arch/arm/mach-s5pc1xx/Kconfig index b15b2e7b6a01..d8b85f80e631 100644 --- a/arch/arm/mach-s5pc1xx/Kconfig +++ b/arch/arm/mach-s5pc1xx/Kconfig @@ -7,7 +7,6 @@ choice config TARGET_S5P_GONI bool "S5P Goni board" select OF_CONTROL - select BLK select MISC_COMMON select MMC -- 2.43.0 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* Re: [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini ` (5 preceding siblings ...) 2025-01-15 1:22 ` [PATCHv2 6/6] block: Remove "select BLK" from non-block drivers Tom Rini @ 2025-01-21 4:49 ` Tom Rini 6 siblings, 0 replies; 38+ messages in thread From: Tom Rini @ 2025-01-21 4:49 UTC (permalink / raw) To: u-boot, Tom Rini On Tue, 14 Jan 2025 19:22:07 -0600, Tom Rini wrote: > Hey all, > > One problem we have today is how the BLK symbol is set and used in > Kconfig files. Part of the challenge is that we use it as a gating > symbol for "we have a block device" and also for "enable block device > library code". What this series does is move to always use "select BLK" > by block drivers (a few were and a few others had it the inverse) and > then "depends on BLK" for functionality that needs a block device > present. The end result of this series is that a number of platforms > which had disabled EFI_LOADER now don't ask for it (they have no block > device) and espresso7420 has a regression about MMC support fixed. With > v2 of this I've picked up the review tags from v1 and also reworded the > body of the commit in the first patch. > > [...] Applied to u-boot/master, thanks! -- Tom ^ permalink raw reply [flat|nested] 38+ messages in thread
end of thread, other threads:[~2025-01-21 4:49 UTC | newest] Thread overview: 38+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-12-20 22:22 [PATCH 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2024-12-20 22:22 ` [PATCH 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini 2024-12-22 23:49 ` Jaehoon Chung 2025-01-14 13:25 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 2024-12-20 22:22 ` [PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:43 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 2024-12-20 22:22 ` [PATCH 3/6] efi_loader: Depend on BLK Tom Rini 2024-12-20 22:50 ` Heinrich Schuchardt 2024-12-20 22:22 ` [PATCH 4/6] blk: Make block subsystems select BLK Tom Rini 2024-12-23 18:31 ` Peter Robinson 2024-12-23 18:53 ` Tom Rini 2025-01-14 13:45 ` Quentin Schulz 2025-01-14 16:58 ` Tom Rini 2025-01-15 17:38 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 5/6] mtd: Correct dependency of BLK Tom Rini 2024-12-23 18:27 ` Peter Robinson 2025-01-14 13:46 ` Quentin Schulz 2024-12-20 22:22 ` [PATCH 6/6] block: Remove "select BLK" from non-block drivers Tom Rini 2024-12-23 18:26 ` Peter Robinson 2025-01-14 13:53 ` Quentin Schulz 2025-01-14 16:59 ` Tom Rini 2025-01-15 17:49 ` Quentin Schulz 2025-01-15 20:20 ` Tom Rini 2025-01-16 9:21 ` Quentin Schulz 2025-01-16 14:33 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini 2025-01-15 1:22 ` [PATCHv2 1/6] drivers/mmc/Kconfig: Remove extraneous BLK dependencies Tom Rini 2025-01-15 1:22 ` [PATCHv2 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol Tom Rini 2025-01-15 1:22 ` [PATCHv2 3/6] efi_loader: Depend on BLK Tom Rini 2025-01-15 1:22 ` [PATCHv2 4/6] blk: Make block subsystems select BLK Tom Rini 2025-01-15 17:51 ` Quentin Schulz 2025-01-15 18:28 ` Tom Rini 2025-01-15 1:22 ` [PATCHv2 5/6] mtd: Correct dependency of BLK Tom Rini 2025-01-15 1:22 ` [PATCHv2 6/6] block: Remove "select BLK" from non-block drivers Tom Rini 2025-01-21 4:49 ` [PATCHv2 0/6] Rework the BLK symbol usage in Kconfig Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox