summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bootdev.h13
-rw-r--r--include/bootflow.h8
2 files changed, 9 insertions, 12 deletions
diff --git a/include/bootdev.h b/include/bootdev.h
index 4b6a8eb8d8f..8fa67487c63 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -265,21 +265,22 @@ int bootdev_find_by_any(const char *name, struct udevice **devp,
int *method_flagsp);
/**
- * bootdev_setup_iter_order() - Set up the ordering of bootdevs to scan
+ * bootdev_setup_iter() - Set up iteration through bootdevs
*
- * This sets up the ordering information in @iter, based on the priority of each
- * bootdev and the bootdev-order property in the bootstd node
- *
- * If a single device is requested, no ordering is needed
+ * This sets up the an interation, based on the priority of each bootdev, the
+ * bootdev-order property in the bootstd node (or the boot_targets env var).
*
* @iter: Iterator to update with the order
* @devp: On entry, *devp is NULL to scan all, otherwise this is the (single)
* device to scan. Returns the first device to use, which is the passed-in
* @devp if it was non-NULL
+ * @method_flagsp: If non-NULL, returns any flags implied by the label
+ * (enum bootflow_meth_flags_t), 0 if none
* Return: 0 if OK, -ENOENT if no bootdevs, -ENOMEM if out of memory, other -ve
* on other error
*/
-int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp);
+int bootdev_setup_iter(struct bootflow_iter *iter, struct udevice **devp,
+ int *method_flagsp);
/**
* bootdev_list_hunters() - List the available bootdev hunters
diff --git a/include/bootflow.h b/include/bootflow.h
index 69ac90483c6..bdb37352ab9 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -163,7 +163,8 @@ enum bootflow_meth_flags_t {
* @flags: Flags to use (see enum bootflow_flags_t). If BOOTFLOWF_GLOBAL_FIRST is
* enabled then the global bootmeths are being scanned, otherwise we have
* moved onto the bootdevs
- * @dev: Current bootdev, NULL if none
+ * @dev: Current bootdev, NULL if none. This is only ever updated in
+ * bootflow_iter_set_dev()
* @part: Current partition number (0 for whole device)
* @method: Current bootmeth
* @max_part: Maximum hardware partition number in @dev, 0 if there is no
@@ -173,9 +174,6 @@ enum bootflow_meth_flags_t {
* forward (e.g. to skip the current partition because it is not valid)
* -ESHUTDOWN: try next bootdev
* @num_devs: Number of bootdevs in @dev_order
- * @cur_dev: Current bootdev number, an index into @dev_order[]
- * @dev_order: List of bootdevs to scan, in order of priority. The scan starts
- * with the first one on the list
* @labels: List of labels to scan for bootdevs
* @cur_label: Current label being processed
* @num_methods: Number of bootmeth devices in @method_order
@@ -198,8 +196,6 @@ struct bootflow_iter {
int first_bootable;
int err;
int num_devs;
- int cur_dev;
- struct udevice **dev_order;
const char *const *labels;
int cur_label;
int num_methods;