diff options
author | Stefan Roese <sr@denx.de> | 2012-08-27 12:50:57 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-09-27 09:50:00 -0700 |
commit | 77552b0633f0856f6bb73b8e1f75334601c6a5c9 (patch) | |
tree | 74bee43ba04ce9b99e23ac16680d8f6b371bcfbb /common/spl | |
parent | ae83d882f5fdf7aa7c5aec09cfafb593153c25d6 (diff) | |
download | u-boot-imx-77552b0633f0856f6bb73b8e1f75334601c6a5c9.zip u-boot-imx-77552b0633f0856f6bb73b8e1f75334601c6a5c9.tar.gz u-boot-imx-77552b0633f0856f6bb73b8e1f75334601c6a5c9.tar.bz2 |
SPL: Use image_get_xxx() functions to access header values
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 70c374a..3b4fcba 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -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 { |