Karicheri, Muralidharan | bf411ea | 2014-04-04 13:16:48 -0400 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2014 |
| 3 | * Texas Instruments Incorporated |
| 4 | * Refactored common functions in to gpimage-common.c. Include this common |
| 5 | * header file |
| 6 | * |
| 7 | * (C) Copyright 2010 |
| 8 | * Linaro LTD, www.linaro.org |
| 9 | * Author: John Rigby <john.rigby@linaro.org> |
| 10 | * Based on TI's signGP.c |
| 11 | * |
| 12 | * (C) Copyright 2009 |
| 13 | * Stefano Babic, DENX Software Engineering, sbabic@denx.de. |
| 14 | * |
| 15 | * (C) Copyright 2008 |
| 16 | * Marvell Semiconductor <www.marvell.com> |
| 17 | * Written-by: Prafulla Wadaskar <prafulla@marvell.com> |
| 18 | * |
| 19 | * SPDX-License-Identifier: GPL-2.0+ |
| 20 | */ |
| 21 | |
| 22 | #ifndef _GPIMAGE_H_ |
| 23 | #define _GPIMAGE_H_ |
| 24 | |
| 25 | /* common headers for gpimage and omapimage formats */ |
| 26 | struct gp_header { |
| 27 | uint32_t size; |
| 28 | uint32_t load_addr; |
| 29 | }; |
| 30 | #define GPIMAGE_HDR_SIZE (sizeof(struct gp_header)) |
| 31 | |
| 32 | /* common functions across gpimage and omapimage handlers */ |
| 33 | int valid_gph_size(uint32_t size); |
| 34 | int valid_gph_load_addr(uint32_t load_addr); |
| 35 | int gph_verify_header(struct gp_header *gph, int be); |
| 36 | void gph_print_header(const struct gp_header *gph, int be); |
| 37 | void gph_set_header(struct gp_header *gph, uint32_t size, uint32_t load_addr, |
| 38 | int be); |
| 39 | int gpimage_check_params(struct image_tool_params *params); |
| 40 | #endif |