mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
bootstd: Allow the bootdev to be optional in bootflows
With global bootmeths we want to scan without a bootdev. Update the logic to allow this. Change the bootflow command to show the bootdev only when valid. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -36,7 +36,6 @@ enum {
|
||||
|
||||
int bootdev_add_bootflow(struct bootflow *bflow)
|
||||
{
|
||||
struct bootdev_uc_plat *ucp = dev_get_uclass_plat(bflow->dev);
|
||||
struct bootstd_priv *std;
|
||||
struct bootflow *new;
|
||||
int ret;
|
||||
@@ -52,7 +51,11 @@ int bootdev_add_bootflow(struct bootflow *bflow)
|
||||
memcpy(new, bflow, sizeof(*bflow));
|
||||
|
||||
list_add_tail(&new->glob_node, &std->glob_head);
|
||||
list_add_tail(&new->bm_node, &ucp->bootflow_head);
|
||||
if (bflow->dev) {
|
||||
struct bootdev_uc_plat *ucp = dev_get_uclass_plat(bflow->dev);
|
||||
|
||||
list_add_tail(&new->bm_node, &ucp->bootflow_head);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user