]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Use the correct FIT_..._PROP constants
authorSimon Glass <sjg@chromium.org>
Tue, 26 Sep 2023 14:14:35 +0000 (08:14 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2023 18:38:12 +0000 (14:38 -0400)
Rather than open-coding the property names, use the existing constants
provided for this purpose. This better aligns the simple-FIT code with
the full FIT implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c

index 9373a562b26279583e782f9b564b9e76b527dfc2..93480a5a60d7e58d9da0c636db775f381344a487 100644 (file)
@@ -44,7 +44,7 @@ static int find_node_from_desc(const void *fit, int node, const char *str)
        for (child = fdt_first_subnode(fit, node); child >= 0;
             child = fdt_next_subnode(fit, child)) {
                int len;
-               const char *desc = fdt_getprop(fit, child, "description", &len);
+               const char *desc = fdt_getprop(fit, child, FIT_DESC_PROP, &len);
 
                if (!desc)
                        continue;
@@ -476,10 +476,11 @@ static int spl_fit_record_loadable(const struct spl_fit_info *ctx, int index,
        node = spl_fit_get_image_node(ctx, "loadables", index);
 
        ret = fdt_record_loadable(blob, index, name, image->load_addr,
-                                 image->size, image->entry_point,
-                                 fdt_getprop(ctx->fit, node, "type", NULL),
-                                 fdt_getprop(ctx->fit, node, "os", NULL),
-                                 fdt_getprop(ctx->fit, node, "arch", NULL));
+                       image->size, image->entry_point,
+                       fdt_getprop(ctx->fit, node, FIT_TYPE_PROP, NULL),
+                       fdt_getprop(ctx->fit, node, FIT_OS_PROP, NULL),
+                       fdt_getprop(ctx->fit, node, FIT_ARCH_PROP, NULL));
+
        return ret;
 }