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>
This commit is contained in:
Simon Glass 2023-01-17 10:47:26 -07:00 committed by Tom Rini
parent 3a2cb96e5d
commit b85fc8dbab
4 changed files with 29 additions and 52 deletions

View file

@ -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