aboutsummaryrefslogtreecommitdiff
path: root/include/bootdev.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 10:47:26 -0700
committerTom Rini <trini@konsulko.com>2023-01-23 18:11:39 -0500
commitb85fc8dbabd7c027ad7ad6133578a0d679dbe2ba (patch)
tree6aae549dcbc09ceff6dcbef7c88f84853b0e288b /include/bootdev.h
parent3a2cb96e5dde427ccb670640a6a5fa1d61519a9b (diff)
downloadu-boot-b85fc8dbabd7c027ad7ad6133578a0d679dbe2ba.zip
u-boot-b85fc8dbabd7c027ad7ad6133578a0d679dbe2ba.tar.gz
u-boot-b85fc8dbabd7c027ad7ad6133578a0d679dbe2ba.tar.bz2
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 'include/bootdev.h')
-rw-r--r--include/bootdev.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/bootdev.h b/include/bootdev.h
index d0ca51c..1e91d41 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -50,7 +50,10 @@ struct bootdev_uc_plat {
/** struct bootdev_ops - Operations for the bootdev uclass */
struct bootdev_ops {
/**
- * get_bootflow() - get a bootflow
+ * get_bootflow() - get a bootflow (optional)
+ *
+ * If this is NULL then the default implementaton is used, which is
+ * default_get_bootflow()
*
* @dev: Bootflow device to check
* @iter: Provides current dev, part, method to get. Should update