1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Pantelis Antoniou
2017-09-04 23:12:14 +03:00
committed by Simon Glass
parent f00c36a01e
commit ad026adbcf

View File

@@ -1484,20 +1484,32 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
return noffset; 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) 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; int len;
/* get kernel image unit name from configuration kernel property */ /* 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) if (uname == NULL)
return len; return len;
return fit_image_get_node(fit, uname); 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_conf_print - prints out the FIT configuration details
* @fit: pointer to the FIT format image header * @fit: pointer to the FIT format image header