diff options
author | Simon Glass <sjg@chromium.org> | 2025-01-10 17:00:14 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-22 15:58:04 -0600 |
commit | 1604b4254b1044916414db9f9f5bc12431ce258f (patch) | |
tree | f1d59ce18496dc94cd9bc80a43d3a3c18ddce973 /common/splash_source.c | |
parent | c83e71064e9b85743a79978c79b01a0f2dc1e90b (diff) |
boot: Use fit_image_get_data() to get data
Use this function instead of fit_image_get_emb_data() data, since it
works will FITs that use external data.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/splash_source.c')
-rw-r--r-- | common/splash_source.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/common/splash_source.c b/common/splash_source.c index 5ac32a2f995..2df78a4f2d7 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -395,21 +395,10 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr) } /* Extract the splash data from FIT */ - /* 1. Test if splash is in FIT internal data. */ - if (!fit_image_get_emb_data(fit_header, node_offset, - &internal_splash_data, - &internal_splash_size)) - memmove((void *)(uintptr_t)bmp_load_addr, internal_splash_data, internal_splash_size); - /* 2. Test if splash is in FIT external data with fixed position. */ - else if (!fit_image_get_data_position(fit_header, node_offset, &external_splash_addr)) - is_splash_external = true; - /* 3. Test if splash is in FIT external data with offset. */ - else if (!fit_image_get_data_offset(fit_header, node_offset, &external_splash_addr)) { - /* Align data offset to 4-byte boundary */ - fit_size = ALIGN(fdt_totalsize(fit_header), 4); - /* External splash offset means the offset by end of FIT header */ - external_splash_addr += location->offset + fit_size; - is_splash_external = true; + if (!fit_image_get_data(fit_header, node_offset, &internal_splash_data, + &internal_splash_size)) { + memmove((void *)(uintptr_t)bmp_load_addr, internal_splash_data, + internal_splash_size); } else { printf("Failed to get splash image from FIT\n"); return -ENODATA; |