aboutsummaryrefslogtreecommitdiff
path: root/boot/bootdev-uclass.c
diff options
context:
space:
mode:
authorSimon Glass2022-04-24 23:31:09 -0600
committerTom Rini2022-04-25 10:00:04 -0400
commita8f5be178db53f41338730e001b0f2ab459f7e31 (patch)
tree02cd04356491fa7bb7c036a0851a286550abd668 /boot/bootdev-uclass.c
parenta950d31abe980ba40a0a94fbf41136550187f8cd (diff)
bootstd: Add support for bootflows
Add support for bootflows, including maintaining a list of them and iterating to find them. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r--boot/bootdev-uclass.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index e0baeb82b14..1ede933c2f2 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <bootdev.h>
#include <bootflow.h>
+#include <bootmeth.h>
#include <bootstd.h>
#include <env.h>
#include <fs.h>
@@ -130,6 +131,10 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
bflow->part = iter->part;
+ ret = bootmeth_check(bflow->method, iter);
+ if (ret)
+ return log_msg_ret("check", ret);
+
/*
* partition numbers start at 0 so this cannot succeed, but it can tell
* us whether there is valid media there
@@ -171,6 +176,10 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
bflow->state = BOOTFLOWST_FS;
}
+ ret = bootmeth_read_bootflow(bflow->method, bflow);
+ if (ret)
+ return log_msg_ret("method", ret);
+
return 0;
}
@@ -445,7 +454,7 @@ void bootdev_clear_bootflows(struct udevice *dev)
bflow = list_first_entry(&ucp->bootflow_head, struct bootflow,
bm_node);
- /* later bootflow_remove(bflow); */
+ bootflow_remove(bflow);
}
}