+
+ if (ret < 0)
+ return ret;
+
+ /* Make the load-address of the FDT available for the SPL framework */
+ spl_image->fdt_addr = (void *)image_info.load_addr;
+ /* Try to make space, so we can inject details on the loadables */
+ ret = fdt_shrink_to_minimum(spl_image->fdt_addr, 8192);
+
+ return ret;
+}
+
+static int spl_fit_record_loadable(const void *fit, int images, int index,
+ void *blob, struct spl_image_info *image)
+{
+ char *name;
+ int node, ret;
+
+ ret = spl_fit_get_image_name(fit, images, "loadables",
+ index, &name);
+ if (ret < 0)
+ return ret;
+
+ node = spl_fit_get_image_node(fit, images, "loadables", index);
+
+ ret = fdt_record_loadable(blob, index, name, image->load_addr,
+ image->size, image->entry_point,
+ fdt_getprop(fit, node, "type", NULL),
+ fdt_getprop(fit, node, "os", NULL));