From: Simon Glass Date: Thu, 16 Jan 2025 01:27:02 +0000 (-0700) Subject: vbe: Use blk_read() to read blocks X-Git-Tag: v2025.04-rc1~32^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1c456d199160dae463152858e5c1d642bcc811c;p=pandora-u-boot.git vbe: Use blk_read() to read blocks We should not be using the old blk_d...() interface, is only there to aid migration to driver model. Move to blk_read() instead. Changes in v2: - Split patch into several pieces Signed-off-by: Simon Glass --- diff --git a/boot/vbe_simple.c b/boot/vbe_simple.c index 189e86d2a22..dc4e98d13c5 100644 --- a/boot/vbe_simple.c +++ b/boot/vbe_simple.c @@ -44,7 +44,7 @@ static int simple_read_version(struct udevice *dev, struct blk_desc *desc, return log_msg_ret("get", -EBADF); start /= MMC_MAX_BLOCK_LEN; - if (blk_dread(desc, start, 1, buf) != 1) + if (blk_read(desc->bdev, start, 1, buf) != 1) return log_msg_ret("read", -EIO); strlcpy(state->fw_version, buf, MAX_VERSION_LEN); log_debug("version=%s\n", state->fw_version); @@ -68,7 +68,7 @@ static int simple_read_nvdata(struct udevice *dev, struct blk_desc *desc, return log_msg_ret("get", -EBADF); start /= MMC_MAX_BLOCK_LEN; - if (blk_dread(desc, start, 1, buf) != 1) + if (blk_read(desc->bdev, start, 1, buf) != 1) return log_msg_ret("read", -EIO); nvd = (struct simple_nvdata *)buf; hdr_ver = (nvd->hdr & NVD_HDR_VER_MASK) >> NVD_HDR_VER_SHIFT;