From eacc261178b9c8024cb8de89ee4ca6c68d80d96a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 17 Jan 2023 10:48:08 -0700 Subject: bootstd: Add a new pre-scan priority for bootdevs We need extensions to be set up before we start trying to boot any of the bootdevs. Add a new priority before all the others for tht sort of thing. Also add a 'none' option, so that the first one is not 0. While we are here, comment enum bootdev_prio_t fully and expand the test for the 'bootdev hunt' command. Signed-off-by: Simon Glass --- boot/bootdev-uclass.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'boot') diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index e8686159f2..5ed310c554 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -630,6 +630,7 @@ static int build_order(struct udevice *bootstd, struct udevice **order, int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp) { struct udevice *bootstd, *dev = *devp, **order; + bool show = iter->flags & BOOTFLOWF_SHOW; struct uclass *uc; int count, upto; int ret; @@ -640,6 +641,13 @@ int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp) return log_msg_ret("std", ret); } + /* hunt for any pre-scan devices */ + if (iter->flags & BOOTFLOWF_HUNT) { + ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show); + if (ret) + return log_msg_ret("pre", ret); + } + /* Handle scanning a single device */ if (dev) { iter->flags |= BOOTFLOWF_SINGLE_DEV; -- cgit v1.2.3