summaryrefslogtreecommitdiff
path: root/common/spl/spl_ymodem.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/spl/spl_ymodem.c')
-rw-r--r--common/spl/spl_ymodem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index fdd5261042..038b443845 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -96,7 +96,7 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
int ret;
connection_info_t info;
char buf[BUF_SIZE];
- struct image_header *ih = NULL;
+ struct legacy_img_hdr *ih = NULL;
ulong addr = 0;
info.mode = xyzModem_ymodem;
@@ -111,9 +111,9 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
goto end_stream;
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT_FULL) &&
- image_get_magic((struct image_header *)buf) == FDT_MAGIC) {
+ image_get_magic((struct legacy_img_hdr *)buf) == FDT_MAGIC) {
addr = CONFIG_SYS_LOAD_ADDR;
- ih = (struct image_header *)addr;
+ ih = (struct legacy_img_hdr *)addr;
memcpy((void *)addr, buf, res);
size += res;
@@ -129,7 +129,7 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
if (ret)
return ret;
} else if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
- image_get_magic((struct image_header *)buf) == FDT_MAGIC) {
+ image_get_magic((struct legacy_img_hdr *)buf) == FDT_MAGIC) {
struct spl_load_info load;
struct ymodem_fit_info info;
@@ -147,7 +147,7 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
while ((res = xyzModem_stream_read(buf, BUF_SIZE, &err)) > 0)
size += res;
} else {
- ih = (struct image_header *)buf;
+ ih = (struct legacy_img_hdr *)buf;
ret = spl_parse_image_header(spl_image, bootdev, ih);
if (ret)
goto end_stream;
@@ -158,7 +158,7 @@ int spl_ymodem_load_image(struct spl_image_info *spl_image,
#endif
addr = spl_image->load_addr;
memcpy((void *)addr, buf, res);
- ih = (struct image_header *)addr;
+ ih = (struct legacy_img_hdr *)addr;
size += res;
addr += res;
@@ -177,7 +177,7 @@ end_stream:
#ifdef CONFIG_SPL_GZIP
if (!(IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
- image_get_magic((struct image_header *)buf) == FDT_MAGIC) &&
+ image_get_magic((struct legacy_img_hdr *)buf) == FDT_MAGIC) &&
(ih->ih_comp == IH_COMP_GZIP)) {
if (gunzip((void *)(spl_image->load_addr + sizeof(*ih)),
CONFIG_SYS_BOOTM_LEN,