summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bootflow.h19
-rw-r--r--include/bootmeth.h4
2 files changed, 21 insertions, 2 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index 2ef6eb25cf5..1cfdda403ac 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -11,7 +11,8 @@
#include <bootdev.h>
#include <image.h>
#include <dm/ofnode_decl.h>
-#include <linux/types.h>
+#include <linux/list.h>
+#include <linux/build_bug.h>
struct bootstd_priv;
struct expo;
@@ -213,6 +214,10 @@ enum bootflow_meth_flags_t {
BOOTFLOW_METHF_SINGLE_UCLASS = 1 << 3,
};
+enum {
+ BOOTMETH_MAX_COUNT = 32,
+};
+
/**
* struct bootflow_iter - state for iterating through bootflows
*
@@ -255,10 +260,16 @@ 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)
+ * 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
+ * each method in @method_order[]
+ * @pending_bootdev: if non-NULL, bootdev which will be used when the global
+ * bootmeths are done
+ * @pending_method_flags: method flags which will be used with @pending_bootdev
*/
struct bootflow_iter {
int flags;
@@ -278,8 +289,12 @@ 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;
+ uint methods_done;
+ struct udevice *pending_bootdev;
+ int pending_method_flags;
};
/**
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 */