summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-17 10:48:08 -0700
committerTom Rini <trini@konsulko.com>2023-01-23 18:11:41 -0500
commiteacc261178b9c8024cb8de89ee4ca6c68d80d96a (patch)
treee40fcef678725303048937f4b2d5a393c8613be1 /boot
parent79a7d4a61ff34c7745811c7b3090a60b230c2ef9 (diff)
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 <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootdev-uclass.c8
1 files changed, 8 insertions, 0 deletions
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;