From 4ce78089b2a615eab466347e8996fbd54a876234 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 15 Oct 2025 16:44:11 +0100 Subject: 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 --- include/bootmeth.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/bootmeth.h') 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 */ -- cgit v1.2.3