summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu/spl.c')
-rw-r--r--arch/sandbox/cpu/spl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 1c33a520c64..7056cfd0180 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -27,8 +27,8 @@ int sandbox_find_next_phase(char *fname, int maxlen, bool use_img)
const char *cur_prefix, *next_prefix;
int ret;
- cur_prefix = spl_phase_prefix(spl_phase());
- next_prefix = spl_phase_prefix(spl_next_phase());
+ cur_prefix = xpl_prefix(xpl_phase());
+ next_prefix = xpl_prefix(xpl_next_phase());
ret = os_find_u_boot(fname, maxlen, use_img, cur_prefix, next_prefix);
if (ret)
return log_msg_ret("find", ret);
@@ -55,9 +55,10 @@ void board_init_f(ulong flag)
void board_boot_order(u32 *spl_boot_list)
{
+ struct sandbox_state *state = state_get_current();
+
spl_boot_list[0] = BOOT_DEVICE_VBE;
- spl_boot_list[1] = BOOT_DEVICE_UPL;
- spl_boot_list[2] = BOOT_DEVICE_BOARD;
+ spl_boot_list[1] = state->upl ? BOOT_DEVICE_UPL : BOOT_DEVICE_BOARD;
}
static int spl_board_load_file(struct spl_image_info *spl_image,
@@ -91,7 +92,7 @@ static int load_from_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
struct sandbox_state *state = state_get_current();
- enum u_boot_phase next_phase;
+ enum xpl_phase_t next_phase;
const char *fname;
ulong pos, size;
int full_size;
@@ -101,7 +102,7 @@ static int load_from_image(struct spl_image_info *spl_image,
if (!IS_ENABLED(CONFIG_SANDBOX_VPL))
return -ENOENT;
- next_phase = spl_next_phase();
+ next_phase = xpl_next_phase();
pos = spl_get_image_pos();
size = spl_get_image_size();
if (pos == BINMAN_SYM_MISSING || size == BINMAN_SYM_MISSING) {