blk: Make block subsystems select BLK

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. Symbols such as PVBLOCK which already select'd BLK are
unchanged".

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2025-01-14 19:22:11 -06:00
parent aad5863459
commit a72fa7f2fe
7 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,7 @@
config AHCI config AHCI
bool "Support SATA controllers with driver model" bool "Support SATA controllers with driver model"
depends on DM depends on DM
select BLK
help help
This enables a uclass for disk controllers in U-Boot. Various driver 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 types can use this, such as AHCI/SATA. It does not provide any standard
@ -9,6 +10,7 @@ config AHCI
config SATA config SATA
bool "Support SATA controllers" bool "Support SATA controllers"
select BLK
help help
This enables support for SATA (Serial Advanced Technology This enables support for SATA (Serial Advanced Technology
Attachment), a serial bus standard for connecting to hard drives and Attachment), a serial bus standard for connecting to hard drives and

View file

@ -1,8 +1,5 @@
config BLK config BLK
bool # "Support block devices" bool
depends on DM
def_bool y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA
def_bool y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK
help help
Enable support for block devices, such as SCSI, MMC and USB Enable support for block devices, such as SCSI, MMC and USB
flash sticks. These provide a block-level interface which permits flash sticks. These provide a block-level interface which permits
@ -100,6 +97,7 @@ config TPL_BLOCK_CACHE
config EFI_MEDIA config EFI_MEDIA
bool "Support EFI media drivers" bool "Support EFI media drivers"
default y if EFI || SANDBOX default y if EFI || SANDBOX
select BLK
help help
Enable this to support media devices on top of UEFI. This enables 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 just the uclass so you also need a specific driver to make this do
@ -139,6 +137,7 @@ endif # EFI_MEDIA
config IDE config IDE
bool "Support IDE controllers" bool "Support IDE controllers"
select BLK
help help
Enables support for IDE (Integrated Drive Electronics) hard drives. Enables support for IDE (Integrated Drive Electronics) hard drives.
This allows access to raw blocks and filesystems on an IDE drive This allows access to raw blocks and filesystems on an IDE drive

View file

@ -3,6 +3,7 @@ menu "MMC Host controller Support"
config MMC config MMC
bool "MMC/SD/SDIO card support" bool "MMC/SD/SDIO card support"
default ARM || PPC || SANDBOX default ARM || PPC || SANDBOX
select BLK
select DM_MMC select DM_MMC
help help
This selects MultiMediaCard, Secure Digital and Secure This selects MultiMediaCard, Secure Digital and Secure

View file

@ -4,6 +4,7 @@
config NVME config NVME
bool "NVM Express device support" bool "NVM Express device support"
select BLK
help help
This option enables support for NVM Express devices. This option enables support for NVM Express devices.
It supports basic functions of NVMe (read/write). It supports basic functions of NVMe (read/write).

View file

@ -1,5 +1,6 @@
config SCSI config SCSI
bool "Support SCSI controllers with driver model" bool "Support SCSI controllers with driver model"
select BLK
help help
This enables support for SCSI (Small Computer System Interface), This enables support for SCSI (Small Computer System Interface),
a parallel interface widely used with storage peripherals such as a parallel interface widely used with storage peripherals such as

View file

@ -1,5 +1,6 @@
menuconfig USB menuconfig USB
bool "USB support" bool "USB support"
select BLK
---help--- ---help---
Universal Serial Bus (USB) is a specification for a serial bus Universal Serial Bus (USB) is a specification for a serial bus
subsystem which offers higher speeds and more features than the subsystem which offers higher speeds and more features than the

View file

@ -64,6 +64,7 @@ config VIRTIO_NET
config VIRTIO_BLK config VIRTIO_BLK
bool "virtio block driver" bool "virtio block driver"
depends on VIRTIO depends on VIRTIO
select BLK
help help
This is the virtual block driver for virtio. It can be used with This is the virtual block driver for virtio. It can be used with
QEMU based targets. QEMU based targets.