diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-11 19:34:48 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-16 11:05:16 -0400 |
commit | 7f8967c2b82f9917987b69fbf43f8f591f3a8516 (patch) | |
tree | 952913642a31420f44746abc3f734e4fea04d1c5 /disk | |
parent | 14d2c5d819bb9f011b518c5394af90c3d8e0d17f (diff) | |
download | u-boot-7f8967c2b82f9917987b69fbf43f8f591f3a8516.tar.gz u-boot-7f8967c2b82f9917987b69fbf43f8f591f3a8516.tar.bz2 u-boot-7f8967c2b82f9917987b69fbf43f8f591f3a8516.zip |
blk: Rename HAVE_BLOCK_DEVICE
This option is fact really related to SPL. For U-Boot proper we always use
driver model for block devices, so CONFIG_BLK is enabled if block devices
are in use.
It is only for SPL that we have two cases:
- SPL_BLK is enabled, in which case we use driver model and blk-uclass.c
- SPL_BLK is not enabled, in which case (if we need block devices) we must
use blk_legacy.c
Rename the symbol to SPL_LEGACY_BLOCK to make this clear. This is
different enough from BLK and SPL_BLK that there should be no confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'disk')
-rw-r--r-- | disk/Makefile | 4 | ||||
-rw-r--r-- | disk/disk-uclass.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/disk/Makefile b/disk/Makefile index 458e21e3fb..45588cf66e 100644 --- a/disk/Makefile +++ b/disk/Makefile @@ -10,8 +10,8 @@ ifdef CONFIG_$(SPL_TPL_)BLK obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += disk-uclass.o endif -# Must have BLK or HAVE_BLOCK_DEVICE to support partitions -ifneq ($(CONFIG_$(SPL_TPL_)BLK),$(CONFIG_HAVE_BLOCK_DEVICE),) +# Must have BLK or SPL_LEGACY_BLOCK to support partitions +ifneq ($(CONFIG_$(SPL_TPL_)BLK),$(CONFIG_SPL_LEGACY_BLOCK),) obj-$(CONFIG_$(SPL_TPL_)MAC_PARTITION) += part_mac.o obj-$(CONFIG_$(SPL_TPL_)DOS_PARTITION) += part_dos.o obj-$(CONFIG_$(SPL_TPL_)ISO_PARTITION) += part_iso.o diff --git a/disk/disk-uclass.c b/disk/disk-uclass.c index f3fb942a6b..9351a5cfa6 100644 --- a/disk/disk-uclass.c +++ b/disk/disk-uclass.c @@ -27,8 +27,7 @@ int part_create_block_devices(struct udevice *blk_dev) struct udevice *dev; int ret; - if (!CONFIG_IS_ENABLED(PARTITIONS) || - !CONFIG_IS_ENABLED(HAVE_BLOCK_DEVICE)) + if (!CONFIG_IS_ENABLED(PARTITIONS) || !blk_enabled()) return 0; if (device_get_uclass_id(blk_dev) != UCLASS_BLK) |