summaryrefslogtreecommitdiff
path: root/include/bootflow.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 10:48:09 -0700
committerTom Rini <trini@konsulko.com>2023-01-23 18:11:41 -0500
commit66e3dce78750f6fc4f6a402ce62c20ba95976dd1 (patch)
treeea4d629072d737d7ddfcc88e9af34e83ca5960a9 /include/bootflow.h
parenteacc261178b9c8024cb8de89ee4ca6c68d80d96a (diff)
bootstd: Allow hunting for a bootdev by label
Add a function to hunt for a bootdev label and find the bootdev produced by the hunter (or already present). Add a few extra flags so that we can distinguish between "mmc1", "mmc" and "1" which all need to be handled differently. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootflow.h')
-rw-r--r--include/bootflow.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index 4012f4b8a8..81dbcd6754 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -99,7 +99,10 @@ struct bootflow {
* Internal flags:
* @BOOTFLOWF_SINGLE_DEV: (internal) Just scan one bootdev
* @BOOTFLOWF_SKIP_GLOBAL: (internal) Don't scan global bootmeths
- * this uclass
+ * @BOOTFLOWF_SINGLE_UCLASS: (internal) Keep scanning through all devices in
+ * this uclass (used with things like "mmc")
+ * @BOOTFLOWF_SINGLE_MEDIA: (internal) Scan one media device in the uclass (used
+ * with things like "mmc1")
*/
enum bootflow_flags_t {
BOOTFLOWF_FIXED = 1 << 0,
@@ -113,6 +116,8 @@ enum bootflow_flags_t {
*/
BOOTFLOWF_SINGLE_DEV = 1 << 16,
BOOTFLOWF_SKIP_GLOBAL = 1 << 17,
+ BOOTFLOWF_SINGLE_UCLASS = 1 << 18,
+ BOOTFLOWF_SINGLE_MEDIA = 1 << 19,
};
/**
@@ -124,10 +129,17 @@ enum bootflow_flags_t {
*
* @BOOTFLOW_METHF_DHCP_ONLY: Only use dhcp (scripts and EFI)
* @BOOTFLOW_METHF_PXE_ONLY: Only use pxe (PXE boot)
+ * @BOOTFLOW_METHF_SINGLE_DEV: Scan only a single bootdev (used for labels like
+ * "3"). This is used if a sequence number is provided instead of a label
+ * @BOOTFLOW_METHF_SINGLE_UCLASS: Scan all bootdevs in this one uclass (used
+ * with things like "mmc"). If this is not set, then the bootdev has an integer
+ * value in the label (like "mmc2")
*/
enum bootflow_meth_flags_t {
BOOTFLOW_METHF_DHCP_ONLY = 1 << 0,
BOOTFLOW_METHF_PXE_ONLY = 1 << 1,
+ BOOTFLOW_METHF_SINGLE_DEV = 1 << 2,
+ BOOTFLOW_METHF_SINGLE_UCLASS = 1 << 3,
};
/**