]> git.sur5r.net Git - u-boot/commitdiff
SPL: Use image_get_xxx() functions to access header values
authorStefan Roese <sr@denx.de>
Mon, 27 Aug 2012 10:50:57 +0000 (12:50 +0200)
committerTom Rini <trini@ti.com>
Thu, 27 Sep 2012 16:50:00 +0000 (09:50 -0700)
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
common/spl/spl.c

index 70c374a49071ccaf1046a2ce50e031962fd21eb9..3b4fcba4cbc9f469755b430f4d8606d536e6360a 100644 (file)
@@ -75,13 +75,13 @@ void spl_parse_image_header(const struct image_header *header)
 {
        u32 header_size = sizeof(struct image_header);
 
-       if (__be32_to_cpu(header->ih_magic) == IH_MAGIC) {
-               spl_image.size = __be32_to_cpu(header->ih_size) + header_size;
-               spl_image.entry_point = __be32_to_cpu(header->ih_load);
+       if (image_get_magic(header) == IH_MAGIC) {
+               spl_image.size = image_get_data_size(header) + header_size;
+               spl_image.entry_point = image_get_load(header);
                /* Load including the header */
                spl_image.load_addr = spl_image.entry_point - header_size;
-               spl_image.os = header->ih_os;
-               spl_image.name = (const char *)&header->ih_name;
+               spl_image.os = image_get_os(header);
+               spl_image.name = image_get_name(header);
                debug("spl: payload image: %s load addr: 0x%x size: %d\n",
                        spl_image.name, spl_image.load_addr, spl_image.size);
        } else {