diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-01-08 18:14:09 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-07 01:12:53 +0100 |
commit | b97a2a0a21f279d66de8a9bdbfe21920968bcb1c (patch) | |
tree | 7746eae37d3a468f3471cd303156920637445350 /common/cmd_fpga.c | |
parent | ed29bc4e8142b46b626f67524207b36e43d9aad6 (diff) | |
download | u-boot-imx-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.zip u-boot-imx-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.tar.gz u-boot-imx-b97a2a0a21f279d66de8a9bdbfe21920968bcb1c.tar.bz2 |
[new uImage] Define a API for image handling operations
- Add inline helper macros for basic header processing
- Move common non inline code common/image.c
- Replace direct header access with the API routines
- Rename IH_CPU_* to IH_ARCH_*
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'common/cmd_fpga.c')
-rw-r--r-- | common/cmd_fpga.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c index f55447a..4030d04 100644 --- a/common/cmd_fpga.c +++ b/common/cmd_fpga.c @@ -221,13 +221,13 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) image_header_t *hdr = &header; ulong data; - memmove (&header, (char *)fpga_data, sizeof(image_header_t)); - if (ntohl(hdr->ih_magic) != IH_MAGIC) { + memmove (&header, (char *)fpga_data, image_get_header_size ()); + if (!image_check_magic (hdr)) { puts ("Bad Magic Number\n"); return 1; } - data = ((ulong)fpga_data + sizeof(image_header_t)); - data_size = ntohl(hdr->ih_size); + data = ((ulong)fpga_data + image_get_header_size ()); + data_size = image_get_data_size (hdr); rc = fpga_load (dev, (void *)data, data_size); } break; |