diff options
author | Simon Glass <sjg@chromium.org> | 2023-12-15 20:14:23 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-21 16:07:52 -0500 |
commit | 3405c9b6a592585db80405d960ec219590689159 (patch) | |
tree | dd7e899e351f498e933885b360f5d29bee2324e6 /cmd | |
parent | 6b50aff13f55262210636d7329811c649173fb67 (diff) | |
download | u-boot-3405c9b6a592585db80405d960ec219590689159.tar.gz |
bootm: Create a function to run through the bootz states
In a few places, the bootz command is used to handle a boot. We want
these to be done without needing CONFIG_CMDLINE, so add a new
bootz_run() function to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootz.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cmd/bootz.c b/cmd/bootz.c index 05b15eb4d7..b6bb4aae72 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -74,7 +74,7 @@ static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc, int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct bootm_info bmi; - int states, ret; + int ret; /* Consume 'bootz' */ argc--; argv++; @@ -99,12 +99,7 @@ int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) bmi.conf_fdt = argv[2]; bmi.cmd_name = "bootz"; - states = BOOTM_STATE_MEASURE | BOOTM_STATE_OS_PREP | - BOOTM_STATE_OS_FAKE_GO | BOOTM_STATE_OS_GO; - if (IS_ENABLED(CONFIG_SYS_BOOT_RAMDISK_HIGH)) - states |= BOOTM_STATE_RAMDISK; - - ret = bootm_run_states(&bmi, states); + ret = bootz_run(&bmi); return ret; } |