From b190deb8955f1043817faf84a69dd63d5a53f959 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 20 Oct 2022 18:22:51 -0600 Subject: bootstd: Add a way to set up a bootflow Add a function to init a bootflow, to reduce code duplication. Signed-off-by: Simon Glass --- include/bootflow.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/bootflow.h') diff --git a/include/bootflow.h b/include/bootflow.h index 6aa3d1fff8d..32dbbbbe261 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -144,6 +144,18 @@ struct bootflow_iter { bool doing_global; }; +/** + * bootflow_init() - Set up a bootflow struct + * + * The bootflow is zeroed and set to state BOOTFLOWST_BASE + * + * @bflow: Struct to set up + * @bootdev: Bootdev to use + * @meth: Bootmeth to use + */ +void bootflow_init(struct bootflow *bflow, struct udevice *bootdev, + struct udevice *meth); + /** * bootflow_iter_init() - Reset a bootflow iterator * -- cgit v1.2.3