aboutsummaryrefslogtreecommitdiff
path: root/include/bootm.h
diff options
context:
space:
mode:
authorSimon Glass2023-12-15 20:14:26 -0700
committerTom Rini2023-12-21 16:07:52 -0500
commitd37086a95f4b2c39f9ecfe602b792df8ab3bd8f9 (patch)
tree5162574dffcb651bc2b437522a97fedf4dbea978 /include/bootm.h
parente7683c3675ce425e2f8149dedcaafa02175321ef (diff)
bootm: Create a new boot_run() function to handle booting
Create a common function used by the three existing bootz/i/m_run() functions, to reduce duplicated code. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/bootm.h')
-rw-r--r--include/bootm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/bootm.h b/include/bootm.h
index eba35b33b4e..9e0f8d60de0 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -151,6 +151,24 @@ int bootm_measure(struct bootm_headers *images);
int bootm_run_states(struct bootm_info *bmi, int states);
/**
+ * boot_run() - Run the entire bootm/booti/bootz process
+ *
+ * This runs through the boot process from start to finish, with a base set of
+ * states, along with the extra ones supplied.
+ *
+ * This uses bootm_run_states().
+ *
+ * Note that it is normally easier to use bootm_run(), etc. since they handle
+ * the extra states correctly.
+ *
+ * @bmi: bootm information
+ * @cmd: command being run, NULL if none
+ * @extra_states: Mask of extra states to use for the boot
+ * Return: 0 if ok, something else on error
+ */
+int boot_run(struct bootm_info *bmi, const char *cmd, int extra_states);
+
+/**
* bootm_run() - Run the entire bootm process
*
* This runs through the bootm process from start to finish, using the default