blob: 63a28a264d5e9cb6f8f26578ecf55c129405fffb [file] [log] [blame]
Karicheri, Muralidharanbf411ea2014-04-04 13:16:48 -04001/*
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 */
26struct 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 */
33int valid_gph_size(uint32_t size);
34int valid_gph_load_addr(uint32_t load_addr);
35int gph_verify_header(struct gp_header *gph, int be);
36void gph_print_header(const struct gp_header *gph, int be);
37void gph_set_header(struct gp_header *gph, uint32_t size, uint32_t load_addr,
38 int be);
39int gpimage_check_params(struct image_tool_params *params);
40#endif