aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/spl/spl.c10
-rw-r--r--common/spl/spl_ram.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index dff4eef7071..75051656249 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -150,9 +150,11 @@ void spl_fixup_fdt(void *fdt_blob)
#endif
}
-#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
ulong spl_get_image_pos(void)
{
+ if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS))
+ return BINMAN_SYM_MISSING;
+
#ifdef CONFIG_VPL
if (spl_next_phase() == PHASE_VPL)
return binman_sym(ulong, u_boot_vpl, image_pos);
@@ -164,6 +166,9 @@ ulong spl_get_image_pos(void)
ulong spl_get_image_size(void)
{
+ if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS))
+ return BINMAN_SYM_MISSING;
+
#ifdef CONFIG_VPL
if (spl_next_phase() == PHASE_VPL)
return binman_sym(ulong, u_boot_vpl, size);
@@ -172,7 +177,6 @@ ulong spl_get_image_size(void)
binman_sym(ulong, u_boot_spl, size) :
binman_sym(ulong, u_boot_any, size);
}
-#endif /* BINMAN_SYMBOLS */
ulong spl_get_image_text_base(void)
{
@@ -223,7 +227,7 @@ __weak struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
{
- ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos);
+ ulong u_boot_pos = spl_get_image_pos();
spl_image->size = CONFIG_SYS_MONITOR_LEN;
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index 82964592571..d64710878cf 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -70,7 +70,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
load.read = spl_ram_load_read;
spl_load_simple_fit(spl_image, &load, 0, header);
} else {
- ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos);
+ ulong u_boot_pos = spl_get_image_pos();
debug("Legacy image\n");
/*