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