diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-01-08 18:12:17 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-07 01:12:57 +0100 |
commit | f13e7b2e993c61fed1f607962501e051940d6e80 (patch) | |
tree | 3894629f4d16c470f059ff4aa0d36e949103b79d /include | |
parent | 1ee1180b6e93e56d0282ac8d943e448e9d0eab20 (diff) |
[new uImage] Cleanup image header pointer use in bootm code
- use single image header pointer instead of a set of auxilliary variables.
- add multi component image helper routines: get component size/data address
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/image.h b/include/image.h index 9dc0343586..c605d66269 100644 --- a/include/image.h +++ b/include/image.h @@ -211,13 +211,30 @@ static inline uint32_t image_get_data_size (image_header_t *hdr) { return image_get_size (hdr); } + +/** + * image_get_data - get image payload start address + * @hdr: image header + * + * image_get_data() returns address of the image payload. For single + * component images it is image data start. For multi component + * images it points to the null terminated table of sub-images sizes. + * + * returns: + * image payload data start address + */ +static inline ulong image_get_data (image_header_t *hdr) +{ + return ((ulong)hdr + image_get_header_size ()); +} + static inline uint32_t image_get_image_size (image_header_t *hdr) { return (image_get_size (hdr) + image_get_header_size ()); } -static inline ulong image_get_data (image_header_t *hdr) +static inline ulong image_get_image_end (image_header_t *hdr) { - return ((ulong)hdr + image_get_header_size ()); + return ((ulong)hdr + image_get_image_size (hdr)); } #define image_set_hdr_l(f) \ @@ -307,4 +324,8 @@ static inline int image_check_target_arch (image_header_t *hdr) } #endif -#endif /* __IMAGE_H__ */ +ulong image_multi_count (image_header_t *hdr); +void image_multi_getimg (image_header_t *hdr, ulong idx, + ulong *data, ulong *len); + +#endif /* __IMAGE_H__ */ |