Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig
Subsystems (4)
PATCH 1/1 Move most CONFIG_HAVE_BLOCK_DEVICE to Kconfig
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEIVCE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h
Signed-off-by Adam Ford <[email protected]>
--- arch/Kconfig | 1 + cmd/Kconfig | 3 +++ drivers/ata/Kconfig | 1 + drivers/block/Kconfig | 6 ++++++ drivers/mmc/Kconfig | 1 + drivers/nvme/Kconfig | 1 + drivers/scsi/Kconfig | 1 + include/config_fallbacks.h | 10 +--------- 8 files changed, 15 insertions(+), 9 deletions(-)
arch/Kconfig +1 -0
@@ -74,6 +74,7 @@ config SANDBOX select DM_SPI select DM_GPIO select DM_MMC + select CONFIG_SANDBOX select LZO imply CMD_GETTIME imply CMD_HASH
cmd/Kconfig +3 -0
@@ -672,6 +672,7 @@ config CMD_GPT bool "GPT (GUID Partition Table) command" select PARTITION_UUIDS select EFI_PARTITION + select CONFIG_HAVE_BLOCK_DEVICE imply RANDOM_UUID help Enable the 'gpt' command to ready and write GPT style partition
@@ -819,6 +820,7 @@ config CMD_ONENAND config CMD_PART bool "part" select PARTITION_UUIDS + select CONFIG_HAVE_BLOCK_DEVICE help Read and display information about the partition table on various media.
@@ -911,6 +913,7 @@ config CMD_UNIVERSE config CMD_USB bool "usb" + select CONFIG_HAVE_BLOCK_DEVICE help USB support.
drivers/ata/Kconfig +1 -0
@@ -9,6 +9,7 @@ config AHCI config SATA bool "Support SATA controllers" + select HAVE_BLOCK_DEVICE help This enables support for SATA (Serial Advanced Technology Attachment), a serial bus standard for connecting to hard drives and
drivers/block/Kconfig +6 -0
@@ -10,6 +10,11 @@ config BLK be partitioned into several areas, called 'partitions' in U-Boot. A filesystem can be placed in each partition. +config HAVE_BLOCK_DEVICE + bool "Enable Legacy Block Device" + help + Some devices require block support whether or not DM is enabled + config SPL_BLK bool "Support block devices in SPL" depends on SPL_DM && BLK
@@ -33,6 +38,7 @@ config BLOCK_CACHE config IDE bool "Support IDE controllers" + select HAVE_BLOCK_DEVICE help Enables support for IDE (Integrated Drive Electronics) hard drives. This allows access to raw blocks and filesystems on an IDE drive
drivers/mmc/Kconfig +1 -0
@@ -3,6 +3,7 @@ menu "MMC Host controller Support" config MMC bool "MMC/SD/SDIO card support" default ARM || PPC || SANDBOX + select CONFIG_HAVE_BLOCK_DEVICE help This selects MultiMediaCard, Secure Digital and Secure Digital I/O support.
drivers/nvme/Kconfig +1 -0
@@ -7,6 +7,7 @@ config NVME bool "NVM Express device support" depends on BLK && PCI + select CONFIG_HAVE_BLOCK_DEVICE help This option enables support for NVM Express devices. It supports basic functions of NVMe (read/write).
drivers/scsi/Kconfig +1 -0
@@ -1,5 +1,6 @@ config SCSI bool "Support SCSI controllers" + select CONFIG_HAVE_BLOCK_DEVICE help This enables support for SCSI (Small Computer System Interface), a parallel interface widely used with storage peripherals such as
include/config_fallbacks.h +1 -9
@@ -30,15 +30,7 @@#endif /* Rather than repeat this expression each time, add a define for it */ -#if defined(CONFIG_IDE ) || \ - defined(CONFIG_SATA ) || \ - defined(CONFIG_SCSI ) || \ - defined(CONFIG_CMD_USB ) || \ - defined(CONFIG_CMD_PART ) || \ - defined(CONFIG_CMD_GPT ) || \ - defined(CONFIG_MMC ) || \ - defined(CONFIG_NVME ) || \ - defined(CONFIG_SYSTEMACE ) || \ +#if defined(CONFIG_SYSTEMACE ) || \ (defined(CONFIG_EFI_LOADER ) && !defined(CONFIG_SPL_BUILD )) || \ defined(CONFIG_SANDBOX )#define CONFIG_HAVE_BLOCK_DEVICE
Signature · 1 line
2.7.4
Quoted 6 lines · Adam Ford
config_fallbacks.hhas some logic that setsHAVE_BLOCK_DEVICEbased on a list of enabled options. MovingHAVE_BLOCK_DEIVCEtoKconfigallows us to drastically shrink the logic inconfig_fallbacks.hSigned-off-by Adam Ford <[email protected]>
Note that this needed a bit of work. HAVE_BLOCK_DEVICE needed to be turned into CONFIG_HAVE_BLOCK_DEVICE and then the patch made to ensure we only select HAVE_BLOCK_DEVICE, not CONFIG_HAVE_BLOCK_DEVICE. With all of that, applied to u-boot/master, thanks!
Signature · 1 line
Tom