image: Add crypto_algo struct for RSA info
[oweals/u-boot.git] / common / image-fit.c
index f833fe32cee566b662775b3eb1d9d227a6736391..77dc011dc3bfc25f5e9d084f54bb25192dda9367 100644 (file)
@@ -1026,7 +1026,7 @@ int fit_image_verify(const void *fit, int image_noffset)
        }
 
        /* Process all hash subnodes of the component image node */
-       fdt_for_each_subnode(fit, noffset, image_noffset) {
+       fdt_for_each_subnode(noffset, fit, image_noffset) {
                const char *name = fit_get_name(fit, noffset, NULL);
 
                /*
@@ -1457,7 +1457,7 @@ int fit_conf_get_prop_node(const void *fit, int noffset,
 void fit_conf_print(const void *fit, int noffset, const char *p)
 {
        char *desc;
-       char *uname;
+       const char *uname;
        int ret;
        int loadables_index;
 
@@ -1469,7 +1469,7 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
        else
                printf("%s\n", desc);
 
-       uname = (char *)fdt_getprop(fit, noffset, FIT_KERNEL_PROP, NULL);
+       uname = fdt_getprop(fit, noffset, FIT_KERNEL_PROP, NULL);
        printf("%s  Kernel:       ", p);
        if (uname == NULL)
                printf("unavailable\n");
@@ -1477,26 +1477,23 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
                printf("%s\n", uname);
 
        /* Optional properties */
-       uname = (char *)fdt_getprop(fit, noffset, FIT_RAMDISK_PROP, NULL);
+       uname = fdt_getprop(fit, noffset, FIT_RAMDISK_PROP, NULL);
        if (uname)
                printf("%s  Init Ramdisk: %s\n", p, uname);
 
-       uname = (char *)fdt_getprop(fit, noffset, FIT_FDT_PROP, NULL);
+       uname = fdt_getprop(fit, noffset, FIT_FDT_PROP, NULL);
        if (uname)
                printf("%s  FDT:          %s\n", p, uname);
 
-       uname = (char *)fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL);
+       uname = fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL);
        if (uname)
                printf("%s  FPGA:         %s\n", p, uname);
 
        /* Print out all of the specified loadables */
        for (loadables_index = 0;
-            fdt_get_string_index(fit, noffset,
-                       FIT_LOADABLE_PROP,
-                       loadables_index,
-                       (const char **)&uname) == 0;
-            loadables_index++)
-       {
+            uname = fdt_stringlist_get(fit, noffset, FIT_LOADABLE_PROP,
+                                       loadables_index, NULL), uname;
+            loadables_index++) {
                if (loadables_index == 0) {
                        printf("%s  Loadables:    ", p);
                } else {
@@ -1560,13 +1557,13 @@ int fit_get_node_from_config(bootm_headers_t *images, const char *prop_name,
        cfg_noffset = fit_conf_get_node(fit_hdr, images->fit_uname_cfg);
        if (cfg_noffset < 0) {
                debug("*  %s: no such config\n", prop_name);
-               return -ENOENT;
+               return -EINVAL;
        }
 
        noffset = fit_conf_get_prop_node(fit_hdr, cfg_noffset, prop_name);
        if (noffset < 0) {
                debug("*  %s: no '%s' in config\n", prop_name, prop_name);
-               return -ENOLINK;
+               return -ENOENT;
        }
 
        return noffset;