summaryrefslogtreecommitdiff
path: root/include/bootflow.h
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-10-15 16:44:07 +0100
committerTom Rini <[email protected]>2025-10-22 14:16:56 -0600
commit0fe6de0dc5b137a2def3a8cc0baa2fb73a3f8541 (patch)
treedbad58ec96768c879c82b4984e0da5dd374580d2 /include/bootflow.h
parenteca985905d7956ca69e1abfe9ef1d3eb5c64c0a9 (diff)
boot: Add a flag for whether there are global bootmeths
The current 'doing_global' refers to being in the state of processing global bootmeths. Since global bootmeths are currently used once at the start, it becomes false once the last global bootmeth has been used. In preparation for allowing bootmeths to run at other points in the bootstd interation, add a new 'have_global' flag which tracks whether there are any global bootmeths in the method_order[] list. It is set up when iteration starts. Unlike doing_global which resets back to false after the global bootmeths have been handled, once have_global is set to true, it remains true for the entire iteration process. This provides a quick check as to whether global-bootmeth processing is needed. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r--include/bootflow.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index 2ef6eb25cf5..b18baebb4ba 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -255,6 +255,7 @@ enum bootflow_meth_flags_t {
* @cur_prio: Current priority being scanned
* @method_order: List of bootmeth devices to use, in order. The normal methods
* appear first, then the global ones, if any
+ * @have_global: true if we have global bootmeths in @method_order[]
* @doing_global: true if we are iterating through the global bootmeths (which
* happens before the normal ones)
* @method_flags: flags controlling which methods should be used for this @dev
@@ -278,6 +279,7 @@ struct bootflow_iter {
int first_glob_method;
enum bootdev_prio_t cur_prio;
struct udevice **method_order;
+ bool have_global;
bool doing_global;
int method_flags;
};