From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Tom Rini <trini@konsulko.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Alexander Graf <agraf@csgraf.de>,
Alexandru Gagniuc <mr.nuke.me@gmail.com>,
Alexey Brodkin <abrodkin@synopsys.com>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Anastasiia Lukianenko <vicooodin@gmail.com>,
Andrew Davis <afd@ti.com>, Andrew Scull <ascull@google.com>,
Bin Meng <bmeng.cn@gmail.com>, Heiko Schocher <hs@denx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Mark Kettenis <kettenis@openbsd.org>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Michal Simek <michal.simek@amd.com>,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
Pali Roh??r <pali@kernel.org>, Peng Fan <peng.fan@nxp.com>,
Philippe Reynes <philippe.reynes@softathome.com>,
Stefan Roese <sr@denx.de>, Wolfgang Denk <wd@denx.de>,
Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH 10/23] blk: Rename HAVE_BLOCK_DEVICE
Date: Mon, 8 Aug 2022 09:49:34 +0900 [thread overview]
Message-ID: <20220808004934.GA44816@laputa> (raw)
In-Reply-To: <20220807154708.1418967-11-sjg@chromium.org>
On Sun, Aug 07, 2022 at 09:46:55AM -0600, Simon Glass wrote:
> 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>
> ---
>
> common/spl/Kconfig | 4 ++--
> configs/axm_defconfig | 2 +-
> configs/bcm968380gerg_ram_defconfig | 2 +-
> configs/gardena-smart-gateway-mt7688_defconfig | 2 +-
> configs/nsim_hs38_defconfig | 2 +-
> configs/qemu-ppce500_defconfig | 2 +-
> disk/Makefile | 4 ++--
> disk/disk-uclass.c | 3 +--
> doc/develop/driver-model/migration.rst | 2 +-
> drivers/Makefile | 2 +-
> drivers/ata/Kconfig | 2 +-
> drivers/block/Kconfig | 8 ++++----
> drivers/block/Makefile | 2 +-
> drivers/mmc/Kconfig | 2 +-
> drivers/nvme/Kconfig | 2 +-
> drivers/scsi/Kconfig | 2 +-
> drivers/xen/Kconfig | 2 +-
> include/blk.h | 2 +-
> lib/efi_loader/Kconfig | 2 +-
> 19 files changed, 24 insertions(+), 25 deletions(-)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index ee98810e9e9..4c3e74ae5eb 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -792,7 +792,7 @@ config SPL_DM_MAILBOX
> config SPL_MMC
> bool "Support MMC"
> depends on MMC
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> help
> Enable support for MMC (Multimedia Card) within SPL. This enables
> the MMC protocol implementation and allows any enabled drivers to
> @@ -1318,7 +1318,7 @@ config SPL_THERMAL
>
> config SPL_USB_HOST
> bool "Support USB host drivers"
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> help
> Enable access to USB (Universal Serial Bus) host devices so that
> SPL can load U-Boot from a connected USB peripheral, such as a USB
> diff --git a/configs/axm_defconfig b/configs/axm_defconfig
> index a5f60bd8d0c..c42fb37d6c9 100644
> --- a/configs/axm_defconfig
> +++ b/configs/axm_defconfig
> @@ -80,7 +80,7 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> CONFIG_SPL_DM=y
> CONFIG_BLK=y
> -CONFIG_HAVE_BLOCK_DEVICE=y
> +CONFIG_SPL_LEGACY_BLOCK=y
> CONFIG_CLK=y
> CONFIG_CLK_AT91=y
> CONFIG_AT91_GPIO=y
> diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig
> index 0475535e991..246add6029c 100644
> --- a/configs/bcm968380gerg_ram_defconfig
> +++ b/configs/bcm968380gerg_ram_defconfig
> @@ -42,7 +42,7 @@ CONFIG_CMD_NAND=y
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> # CONFIG_NET is not set
> # CONFIG_DM_DEVICE_REMOVE is not set
> -CONFIG_HAVE_BLOCK_DEVICE=y
> +CONFIG_SPL_LEGACY_BLOCK=y
> CONFIG_BCM6345_GPIO=y
> CONFIG_LED=y
> CONFIG_LED_BCM6328=y
> diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig
> index b9ee281be9f..fdfab14d53e 100644
> --- a/configs/gardena-smart-gateway-mt7688_defconfig
> +++ b/configs/gardena-smart-gateway-mt7688_defconfig
> @@ -78,7 +78,7 @@ CONFIG_VERSION_VARIABLE=y
> CONFIG_NET_RANDOM_ETHADDR=y
> CONFIG_SPL_DM=y
> # CONFIG_DM_DEVICE_REMOVE is not set
> -CONFIG_HAVE_BLOCK_DEVICE=y
> +CONFIG_SPL_LEGACY_BLOCK=y
> CONFIG_BOOTCOUNT_LIMIT=y
> CONFIG_LED=y
> CONFIG_LED_BLINK=y
> diff --git a/configs/nsim_hs38_defconfig b/configs/nsim_hs38_defconfig
> index 3c3d1812a79..3f23fc4189f 100644
> --- a/configs/nsim_hs38_defconfig
> +++ b/configs/nsim_hs38_defconfig
> @@ -30,7 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> CONFIG_USE_BOOTFILE=y
> CONFIG_BOOTFILE="uImage"
> CONFIG_BLK=y
> -CONFIG_HAVE_BLOCK_DEVICE=y
> +CONFIG_SPL_LEGACY_BLOCK=y
> CONFIG_DM_ETH=y
> CONFIG_DM_SERIAL=y
> CONFIG_DEBUG_UART_SHIFT=2
> diff --git a/configs/qemu-ppce500_defconfig b/configs/qemu-ppce500_defconfig
> index 034f7e6935b..3241f5520eb 100644
> --- a/configs/qemu-ppce500_defconfig
> +++ b/configs/qemu-ppce500_defconfig
> @@ -40,7 +40,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
> CONFIG_DM=y
> CONFIG_SIMPLE_BUS_CORRECT_RANGE=y
> CONFIG_BLK=y
> -CONFIG_HAVE_BLOCK_DEVICE=y
> +CONFIG_SPL_LEGACY_BLOCK=y
> CONFIG_LBA48=y
> CONFIG_CHIP_SELECTS_PER_CTRL=0
> CONFIG_MPC8XXX_GPIO=y
> diff --git a/disk/Makefile b/disk/Makefile
> index 458e21e3fb7..45588cf66e4 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 f3fb942a6b9..9351a5cfa68 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())
This hunk should be moved to patch#7?
-Takahiro Akashi
> return 0;
>
> if (device_get_uclass_id(blk_dev) != UCLASS_BLK)
> diff --git a/doc/develop/driver-model/migration.rst b/doc/develop/driver-model/migration.rst
> index 5a604369258..742fea5515c 100644
> --- a/doc/develop/driver-model/migration.rst
> +++ b/doc/develop/driver-model/migration.rst
> @@ -57,7 +57,7 @@ In concert with maintainers migrating their block device usage to the
> appropriate DM driver, CONFIG_BLK needs to be set as well. The final deadline
> here coincides with the final deadline for migration of the various block
> subsystems. At this point we will be able to audit and correct the logic in
> -Kconfig around using CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE and make
> +Kconfig around using CONFIG_PARTITIONS and CONFIG_SPL_LEGACY_BLOCK and make
> use of CONFIG_BLK / CONFIG_SPL_BLK as needed.
>
> CONFIG_DM_SPI / CONFIG_DM_SPI_FLASH
> diff --git a/drivers/Makefile b/drivers/Makefile
> index f2154e15d6a..9d9f69a3c9a 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -59,7 +59,7 @@ obj-$(CONFIG_SPL_WATCHDOG) += watchdog/
> obj-$(CONFIG_SPL_USB_HOST) += usb/host/
> obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
> obj-$(CONFIG_SPL_SATA) += ata/ scsi/
> -obj-$(CONFIG_HAVE_BLOCK_DEVICE) += block/
> +obj-$(CONFIG_SPL_LEGACY_BLOCK) += block/
> obj-$(CONFIG_SPL_BLK) += block/
> obj-$(CONFIG_SPL_THERMAL) += thermal/
>
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 70e6bd321a6..c3f2ac058a3 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -9,7 +9,7 @@ config AHCI
>
> config SATA
> bool "Support SATA controllers"
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> 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 79cdb62aa81..ec9ec1aa7c6 100644
> --- a/drivers/block/Kconfig
> +++ b/drivers/block/Kconfig
> @@ -11,7 +11,7 @@ config BLK
> be partitioned into several areas, called 'partitions' in U-Boot.
> A filesystem can be placed in each partition.
>
> -config HAVE_BLOCK_DEVICE
> +config SPL_LEGACY_BLOCK
> bool "Enable Legacy Block Device"
> help
> Some devices require block support whether or not DM is enabled
> @@ -109,7 +109,7 @@ endif # EFI_MEDIA
>
> config IDE
> bool "Support IDE controllers"
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> help
> Enables support for IDE (Integrated Drive Electronics) hard drives.
> This allows access to raw blocks and filesystems on an IDE drive
> @@ -222,7 +222,7 @@ endif # IDE
>
> config LBA48
> bool "Enable LBA support for disks larger than 137GB"
> - depends on HAVE_BLOCK_DEVICE
> + depends on SPL_LEGACY_BLOCK
> help
> Set this to enable support for disks larger than 137GB.
> Also look at CONFIG_SYS_64BIT_LBA. Without both of these, LBA48
> @@ -231,7 +231,7 @@ config LBA48
>
> config SYS_64BIT_LBA
> bool "Enable 64bit number of blocks on a block device"
> - depends on HAVE_BLOCK_DEVICE
> + depends on SPL_LEGACY_BLOCK
> help
> Make the block subsystem use 64bit sector addresses, rather than the
> default of 32bit.
> diff --git a/drivers/block/Makefile b/drivers/block/Makefile
> index b221a7c6eea..f48d3e12140 100644
> --- a/drivers/block/Makefile
> +++ b/drivers/block/Makefile
> @@ -6,7 +6,7 @@
> obj-$(CONFIG_$(SPL_)BLK) += blk-uclass.o
>
> ifndef CONFIG_$(SPL_)BLK
> -obj-$(CONFIG_HAVE_BLOCK_DEVICE) += blk_legacy.o
> +obj-$(CONFIG_SPL_LEGACY_BLOCK) += blk_legacy.o
> endif
>
> ifndef CONFIG_SPL_BUILD
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index c5e1a1b0981..d45ad1a541d 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 HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> select DM_MMC if DM
> help
> This selects MultiMediaCard, Secure Digital and Secure
> diff --git a/drivers/nvme/Kconfig b/drivers/nvme/Kconfig
> index 2a103ab5ed7..7b6d54615f8 100644
> --- a/drivers/nvme/Kconfig
> +++ b/drivers/nvme/Kconfig
> @@ -4,7 +4,7 @@
>
> config NVME
> bool "NVM Express device support"
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> 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 19872fb52d8..4d643816fcc 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -1,6 +1,6 @@
> config SCSI
> bool "Support SCSI controllers"
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> help
> This enables support for SCSI (Small Computer System Interface),
> a parallel interface widely used with storage peripherals such as
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 6ad2a936682..20db2c53065 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -2,7 +2,7 @@ config PVBLOCK
> bool "Xen para-virtualized block device"
> depends on DM
> select BLK
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> help
> This driver implements the front-end of the Xen virtual
> block device driver. It communicates with a back-end driver
> diff --git a/include/blk.h b/include/blk.h
> index 332481a90b8..5bdffe74015 100644
> --- a/include/blk.h
> +++ b/include/blk.h
> @@ -23,7 +23,7 @@ struct udevice;
>
> static inline bool blk_enabled(void)
> {
> - return CONFIG_IS_ENABLED(BLK) || IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE);
> + return CONFIG_IS_ENABLED(BLK) || IS_ENABLED(CONFIG_SPL_LEGACY_BLOCK);
> }
>
> /* Interface types: */
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index e3f2402d0e8..5feafc16820 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -20,7 +20,7 @@ config EFI_LOADER
> select EVENT_DYNAMIC
> select LIB_UUID
> imply PARTITION_UUIDS
> - select HAVE_BLOCK_DEVICE
> + select SPL_LEGACY_BLOCK
> select REGEX
> imply FAT
> imply FAT_WRITE
> --
> 2.37.1.559.g78731f0fdb-goog
>
next prev parent reply other threads:[~2022-08-08 0:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 15:46 [PATCH 00/23] blk: Rationalise the block interface Simon Glass
2022-08-07 15:46 ` [PATCH 01/23] binman: Put fake files in a subdirectory Simon Glass
2022-08-07 15:46 ` [PATCH 02/23] disk: Correct help for TPL_PARTITIONS Simon Glass
2022-08-08 7:38 ` Heinrich Schuchardt
2022-08-07 15:46 ` [PATCH 03/23] blk: Enable CONFIG_BLK for all media Simon Glass
2022-08-08 8:00 ` Heinrich Schuchardt
2022-08-12 1:34 ` Simon Glass
2022-08-07 15:46 ` [PATCH 04/23] ata: Fix an instance of SPL_SATA_SUPPORT Simon Glass
2022-08-08 8:02 ` Heinrich Schuchardt
2022-08-07 15:46 ` [PATCH 05/23] sandbox: Avoid defining HAVE_BLOCK_DEVICE in Konfig Simon Glass
2022-08-07 15:46 ` [PATCH 06/23] disk: Use Makefile to omit partition drivers Simon Glass
2022-08-07 15:46 ` [PATCH 07/23] blk: Use a function for whether block devices are available Simon Glass
2022-08-07 15:46 ` [PATCH 08/23] cmd: Drop use of HAVE_BLOCK_DEVICE Simon Glass
2022-08-07 15:46 ` [PATCH 09/23] blk: Drop unnecessary #ifdef in in blk_legacy Simon Glass
2022-08-07 15:46 ` [PATCH 10/23] blk: Rename HAVE_BLOCK_DEVICE Simon Glass
2022-08-08 0:49 ` AKASHI Takahiro [this message]
2022-08-12 1:34 ` Simon Glass
2022-08-07 15:46 ` [PATCH 11/23] blk: Select SPL_LEGACY_BLOCK automatically Simon Glass
2022-08-07 15:46 ` [PATCH 12/23] blk: Drop unnecessary CONFIG_SPL_LEGACY_BLOCK in defconfigs Simon Glass
2022-08-07 15:46 ` [PATCH 13/23] blk: Hide the BLK and SPL_LEGACY_BLOCK options Simon Glass
2022-08-08 8:09 ` Heinrich Schuchardt
2022-08-12 1:34 ` Simon Glass
2022-08-07 15:46 ` [PATCH 14/23] blk: Drop IF_TYPE_DOC Simon Glass
2022-08-07 15:47 ` [PATCH 15/23] ide: Use a flag for an ATAPI device Simon Glass
2022-08-07 15:47 ` [PATCH 16/23] blk: Drop IF_TYPE_ATAPI Simon Glass
2022-08-07 15:47 ` [PATCH 17/23] blk: Drop IF_TYPE_SD Simon Glass
2022-08-07 15:47 ` [PATCH 18/23] blk: Rename var in blk_get_devnum_by_typename() Simon Glass
2022-08-07 15:47 ` [PATCH 19/23] blk: Rewrite if_type to name functions Simon Glass
2022-08-07 15:47 ` [PATCH 20/23] efi: Correct assumption about if_type Simon Glass
2022-08-07 15:47 ` [PATCH 21/23] blk: Switch over to using uclass IDs Simon Glass
2022-08-08 1:05 ` AKASHI Takahiro
2022-08-12 1:34 ` Simon Glass
2022-08-07 15:47 ` [PATCH 22/23] blk: Drop if_type Simon Glass
2022-08-07 15:47 ` [PATCH 23/23] blk: Rename if_type to uclass_id Simon Glass
2022-08-08 1:32 ` AKASHI Takahiro
2022-08-08 2:00 ` AKASHI Takahiro
2022-08-12 1:34 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220808004934.GA44816@laputa \
--to=takahiro.akashi@linaro.org \
--cc=abrodkin@synopsys.com \
--cc=afd@ti.com \
--cc=agraf@csgraf.de \
--cc=alpernebiyasak@gmail.com \
--cc=ascull@google.com \
--cc=bmeng.cn@gmail.com \
--cc=hs@denx.de \
--cc=ilias.apalodimas@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=kettenis@openbsd.org \
--cc=masahisa.kojima@linaro.org \
--cc=michal.simek@amd.com \
--cc=mr.nuke.me@gmail.com \
--cc=oleksandr_andrushchenko@epam.com \
--cc=pali@kernel.org \
--cc=peng.fan@nxp.com \
--cc=philippe.reynes@softathome.com \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vicooodin@gmail.com \
--cc=wd@denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox