summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2023-12-03 17:29:31 -0700
committerTom Rini <[email protected]>2024-04-10 13:49:16 -0600
commitdb0c6f47c37f91db5a0caf27ebc870b8fe72c6aa (patch)
treeed6d62e0e7a3b844e544c16786e5a65339b6154d /cmd
parent42a99d0df66d3092dfc1c922de9143448a863118 (diff)
x86: zboot: Move environment setting into zboot_load()
The only difference between the command and the underlying logic is the setting of envrionment variables. Move this out of the command processing since it needs to be done in any case. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/x86/zboot.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c
index f5c90a8ba89..d39ab6a9698 100644
--- a/cmd/x86/zboot.c
+++ b/cmd/x86/zboot.c
@@ -62,30 +62,18 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc,
return 0;
}
-static int _zboot_load(void)
+static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
int ret;
ret = zboot_load();
- if (!ret)
- ret = env_set_hex("zbootbase", map_to_sysmem(state.base_ptr));
- if (!ret)
- ret = env_set_hex("zbootaddr", state.load_address);
if (ret)
return ret;
return 0;
}
-static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[])
-{
- if (_zboot_load())
- return CMD_RET_FAILURE;
-
- return 0;
-}
-
static int _zboot_setup(void)
{
struct boot_params *base_ptr = state.base_ptr;