boot: Rename fit_image_get_data()
This function can only be used with FITs that use embedded data. Rename
it so this is clear.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 44372cb..b7c73f2 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -128,8 +128,8 @@
return -EINVAL;
}
- if (fit_image_get_data(sec_firmware_img, ld_node_off,
- &data, &size)) {
+ if (fit_image_get_emb_data(sec_firmware_img, ld_node_off,
+ &data, &size)) {
printf("SEC Loadable: Can't get subimage data/size");
return -ENOENT;
}
diff --git a/arch/arm/mach-k3/r5/sysfw-loader.c b/arch/arm/mach-k3/r5/sysfw-loader.c
index 188731e..c323d2f 100644
--- a/arch/arm/mach-k3/r5/sysfw-loader.c
+++ b/arch/arm/mach-k3/r5/sysfw-loader.c
@@ -115,7 +115,7 @@
if (node_offset < 0)
return -ENOENT;
- return fit_image_get_data(fit, node_offset, addr, size);
+ return fit_image_get_emb_data(fit, node_offset, addr, size);
}
static void k3_start_system_controller(int rproc_id, bool rproc_loaded,
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index 0cf3824..90c0376 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -104,9 +104,9 @@
is_zimage = 1;
#if defined(CONFIG_FIT)
} else if (images->fit_uname_os && is_zimage) {
- ret = fit_image_get_data(images->fit_hdr_os,
- images->fit_noffset_os,
- (const void **)&data, &len);
+ ret = fit_image_get_emb_data(images->fit_hdr_os,
+ images->fit_noffset_os,
+ (const void **)&data, &len);
if (ret) {
puts("Can't get image data/size!\n");
goto error;
diff --git a/boot/image-fit.c b/boot/image-fit.c
index db7fb61..7ad6e51 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -902,13 +902,13 @@
}
/**
- * fit_image_get_data - get data property and its size for a given component image node
+ * fit_image_get_emb_data - get data property and its size for a given component image node
* @fit: pointer to the FIT format image header
* @noffset: component image node offset
* @data: double pointer to void, will hold data property's data address
* @size: pointer to size_t, will hold data property's data size
*
- * fit_image_get_data() finds data property in a given component image node.
+ * fit_image_get_emb_data() finds data property in a given component image node.
* If the property is found its data start address and size are returned to
* the caller.
*
@@ -916,8 +916,8 @@
* 0, on success
* -1, on failure
*/
-int fit_image_get_data(const void *fit, int noffset,
- const void **data, size_t *size)
+int fit_image_get_emb_data(const void *fit, int noffset, const void **data,
+ size_t *size)
{
int len;
@@ -1074,7 +1074,7 @@
*size = len;
}
} else {
- ret = fit_image_get_data(fit, noffset, data, size);
+ ret = fit_image_get_emb_data(fit, noffset, data, size);
}
return ret;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index ac84625..64c4349 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -289,7 +289,7 @@
src = src_ptr + overhead;
} else {
/* Embedded data */
- if (fit_image_get_data(fit, node, &data, &length)) {
+ if (fit_image_get_emb_data(fit, node, &data, &length)) {
puts("Cannot get image data/size\n");
return -ENOENT;
}
diff --git a/common/splash_source.c b/common/splash_source.c
index f43e7cc..5ac32a2 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -396,7 +396,9 @@
/* Extract the splash data from FIT */
/* 1. Test if splash is in FIT internal data. */
- if (!fit_image_get_data(fit_header, node_offset, &internal_splash_data, &internal_splash_size))
+ 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))
diff --git a/common/update.c b/common/update.c
index 6801b49..d149ca1 100644
--- a/common/update.c
+++ b/common/update.c
@@ -200,7 +200,7 @@
{
const void *data;
- if (fit_image_get_data(fit, noffset, &data, (size_t *)size))
+ if (fit_image_get_emb_data(fit, noffset, &data, (size_t *)size))
return 1;
if (fit_image_get_load(fit, noffset, (ulong *)fladdr))
diff --git a/include/image.h b/include/image.h
index ab96510..e54e219 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1160,8 +1160,8 @@
int fit_image_get_comp(const void *fit, int noffset, uint8_t *comp);
int fit_image_get_load(const void *fit, int noffset, ulong *load);
int fit_image_get_entry(const void *fit, int noffset, ulong *entry);
-int fit_image_get_data(const void *fit, int noffset,
- const void **data, size_t *size);
+int fit_image_get_emb_data(const void *fit, int noffset, const void **data,
+ size_t *size);
int fit_image_get_data_offset(const void *fit, int noffset, int *data_offset);
int fit_image_get_data_position(const void *fit, int noffset,
int *data_position);
diff --git a/tools/image-host.c b/tools/image-host.c
index 5e01b85..007a94f 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -574,7 +574,7 @@
}
/* Get image data and data length */
- if (fit_image_get_data(fit, image_noffset, &data, &size)) {
+ if (fit_image_get_emb_data(fit, image_noffset, &data, &size)) {
fprintf(stderr, "Can't get image data/size\n");
return -1;
}
@@ -654,7 +654,7 @@
int noffset;
/* Get image data and data length */
- if (fit_image_get_data(fit, image_noffset, &data, &size)) {
+ if (fit_image_get_emb_data(fit, image_noffset, &data, &size)) {
fprintf(stderr, "Can't get image data/size\n");
return -1;
}