summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 20:47:26 +0300
committerTom Rini <trini@konsulko.com>2023-01-24 02:11:39 +0300
commitb85fc8dbabd7c027ad7ad6133578a0d679dbe2ba (patch)
tree6aae549dcbc09ceff6dcbef7c88f84853b0e288b /drivers/mmc
parent3a2cb96e5dde427ccb670640a6a5fa1d61519a9b (diff)
downloadu-boot-b85fc8dbabd7c027ad7ad6133578a0d679dbe2ba.tar.xz
bootstd: Add a default method to get bootflows
The code in these functions turns out to often be the same. Add a default get_bootflow() function and allow the drivers to select it by setting the method to NULL. This saves a little code space. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc_bootdev.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/mmc/mmc_bootdev.c b/drivers/mmc/mmc_bootdev.c
index b4f41fb3a6..037b67bc0f 100644
--- a/drivers/mmc/mmc_bootdev.c
+++ b/drivers/mmc/mmc_bootdev.c
@@ -11,30 +11,6 @@
#include <dm.h>
#include <mmc.h>
-static int mmc_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
- struct bootflow *bflow)
-{
- struct udevice *mmc_dev = dev_get_parent(dev);
- struct udevice *blk;
- int ret;
-
- ret = mmc_get_blk(mmc_dev, &blk);
- /*
- * If there is no media, indicate that no more partitions should be
- * checked
- */
- if (ret == -EOPNOTSUPP)
- ret = -ESHUTDOWN;
- if (ret)
- return log_msg_ret("blk", ret);
- assert(blk);
- ret = bootdev_find_in_blk(dev, blk, iter, bflow);
- if (ret)
- return log_msg_ret("find", ret);
-
- return 0;
-}
-
static int mmc_bootdev_bind(struct udevice *dev)
{
struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev);
@@ -45,7 +21,6 @@ static int mmc_bootdev_bind(struct udevice *dev)
}
struct bootdev_ops mmc_bootdev_ops = {
- .get_bootflow = mmc_get_bootflow,
};
static const struct udevice_id mmc_bootdev_ids[] = {