Commit ad026adbcf0d719e736eb58a9059cbbebb2d2423

Authored by Pantelis Antoniou
Committed by Simon Glass
1 parent f00c36a01e

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>

Showing 1 changed file with 15 additions and 3 deletions Side-by-side Diff

... ... @@ -1484,18 +1484,30 @@
1484 1484 return noffset;
1485 1485 }
1486 1486  
1487   -int fit_conf_get_prop_node(const void *fit, int noffset,
  1487 +int fit_conf_get_prop_node_count(const void *fit, int noffset,
1488 1488 const char *prop_name)
1489 1489 {
1490   - char *uname;
  1490 + return fdt_stringlist_count(fit, noffset, prop_name);
  1491 +}
  1492 +
  1493 +int fit_conf_get_prop_node_index(const void *fit, int noffset,
  1494 + const char *prop_name, int index)
  1495 +{
  1496 + const char *uname;
1491 1497 int len;
1492 1498  
1493 1499 /* get kernel image unit name from configuration kernel property */
1494   - uname = (char *)fdt_getprop(fit, noffset, prop_name, &len);
  1500 + uname = fdt_stringlist_get(fit, noffset, prop_name, index, &len);
1495 1501 if (uname == NULL)
1496 1502 return len;
1497 1503  
1498 1504 return fit_image_get_node(fit, uname);
  1505 +}
  1506 +
  1507 +int fit_conf_get_prop_node(const void *fit, int noffset,
  1508 + const char *prop_name)
  1509 +{
  1510 + return fit_conf_get_prop_node_index(fit, noffset, prop_name, 0);
1499 1511 }
1500 1512  
1501 1513 /**