diff options
| author | Simon Glass <[email protected]> | 2025-10-15 16:44:11 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-22 14:16:56 -0600 |
| commit | 4ce78089b2a615eab466347e8996fbd54a876234 (patch) | |
| tree | 461733d23c1e8ec07e6158ec7d7c52a37e102fae /include | |
| parent | e52053c93c128284ccfae11001d7b211bb081aeb (diff) | |
boot: Implement a priority for global bootmeths
Allow bootmeths to select when they want to run, using the bootdev
priority. Provide a new bootmeth_glob_allowed() function which checks if
a bootmeth is ready to use.
Fix a comment in bootflow_system() which is a test for global bootmeths.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/bootflow.h | 2 | ||||
| -rw-r--r-- | include/bootmeth.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index 059d38251b7..1cfdda403ac 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -262,7 +262,7 @@ enum { * 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) + * generally happens before the normal ones) * @method_flags: flags controlling which methods should be used for this @dev * (enum bootflow_meth_flags_t) * @methods_done: indicates which methods have been processed, one bit for diff --git a/include/bootmeth.h b/include/bootmeth.h index 26de593a9a4..2a492dfd73a 100644 --- a/include/bootmeth.h +++ b/include/bootmeth.h @@ -30,10 +30,14 @@ enum bootmeth_flags { * * @desc: A long description of the bootmeth * @flags: Flags for this bootmeth (enum bootmeth_flags) + * @glob_prio: Priority for this bootmeth. If unset (0) the bootmeth is started + * before all other bootmeths. Otherwise it is started before the iteration + * reaches the given priority. */ struct bootmeth_uc_plat { const char *desc; int flags; + enum bootdev_prio_t glob_prio; }; /** struct bootmeth_ops - Operations for boot methods */ |
