[PATCH 4/6] blk: Make block subsystems select BLK

Quentin Schulz quentin.schulz at cherry.de
Wed Jan 15 18:38:02 CET 2025


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 at 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


More information about the U-Boot mailing list