1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

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>
This commit is contained in:
Simon Glass
2023-12-15 20:14:26 -07:00
committed by Tom Rini
parent e7683c3675
commit d37086a95f
2 changed files with 32 additions and 26 deletions

View File

@@ -150,6 +150,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
*