1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-18 08:23:24 +02:00

bootstd: Allow iterating to the next bootdev priortiy

Add a function which moves to the next priority to be processed.

This works by storing the current priority in the bootflow iterator. The
logic to set this up is included in a subsequent commit.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-17 10:48:11 -07:00
committed by Tom Rini
parent e4b694893f
commit 43e89a3069
4 changed files with 165 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
#ifndef __bootflow_h
#define __bootflow_h
#include <bootdev.h>
#include <dm/ofnode_decl.h>
#include <linux/list.h>
@@ -180,6 +181,7 @@ enum bootflow_meth_flags_t {
* @num_methods: Number of bootmeth devices in @method_order
* @cur_method: Current method number, an index into @method_order
* @first_glob_method: First global method, if any, else -1
* @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
* @doing_global: true if we are iterating through the global bootmeths (which
@@ -203,6 +205,7 @@ struct bootflow_iter {
int num_methods;
int cur_method;
int first_glob_method;
enum bootdev_prio_t cur_prio;
struct udevice **method_order;
bool doing_global;
int method_flags;