diff options
author | Simon Glass <sjg@chromium.org> | 2025-01-15 18:27:02 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-22 09:47:49 -0600 |
commit | a1c456d199160dae463152858e5c1d642bcc811c (patch) | |
tree | 3b4ef9e7a1338c1abb7102deecd2fb75c336b33f | |
parent | 21dd873572a01d74bfdfceb7a30b056f8ccba187 (diff) |
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 <sjg@chromium.org>
-rw-r--r-- | boot/vbe_simple.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |