summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>2017-09-04 23:12:14 +0300
committerSimon Glass <sjg@chromium.org>2017-09-15 05:27:48 -0600
commitad026adbcf0d719e736eb58a9059cbbebb2d2423 (patch)
tree4a6b0553bd643c9b461549b8df0fb5b58952ff13 /common
parentf00c36a01e774dea1ed2a1171da9e372610ee8eb (diff)
downloadu-boot-ad026adbcf0d719e736eb58a9059cbbebb2d2423.tar.gz
u-boot-ad026adbcf0d719e736eb58a9059cbbebb2d2423.tar.bz2
u-boot-ad026adbcf0d719e736eb58a9059cbbebb2d2423.zip
fit: Allow multiple images per property
As part of the fdt overlay support which need it, allow a list of configurations per property. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/image-fit.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/common/image-fit.c b/common/image-fit.c
index 109ecfaacc..74e555754c 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1484,20 +1484,32 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
return noffset;
}
-int fit_conf_get_prop_node(const void *fit, int noffset,
+int fit_conf_get_prop_node_count(const void *fit, int noffset,
const char *prop_name)
{
- char *uname;
+ return fdt_stringlist_count(fit, noffset, prop_name);
+}
+
+int fit_conf_get_prop_node_index(const void *fit, int noffset,
+ const char *prop_name, int index)
+{
+ const char *uname;
int len;
/* get kernel image unit name from configuration kernel property */
- uname = (char *)fdt_getprop(fit, noffset, prop_name, &len);
+ uname = fdt_stringlist_get(fit, noffset, prop_name, index, &len);
if (uname == NULL)
return len;
return fit_image_get_node(fit, uname);
}
+int fit_conf_get_prop_node(const void *fit, int noffset,
+ const char *prop_name)
+{
+ return fit_conf_get_prop_node_index(fit, noffset, prop_name, 0);
+}
+
/**
* fit_conf_print - prints out the FIT configuration details
* @fit: pointer to the FIT format image header