mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
79a7d4a61f
commit
eacc261178
12 changed files with 84 additions and 44 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue