blob: d5bf86e5893190e77d6e1b3b6b1dbe4ea3175c1f [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Karicheri, Muralidharanbf411ea2014-04-04 13:16:48 -04002/*
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>
Karicheri, Muralidharanbf411ea2014-04-04 13:16:48 -040019 */
20
21#ifndef _GPIMAGE_H_
22#define _GPIMAGE_H_
23
24/* common headers for gpimage and omapimage formats */
25struct 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 */
32int valid_gph_size(uint32_t size);
33int valid_gph_load_addr(uint32_t load_addr);
34int gph_verify_header(struct gp_header *gph, int be);
35void gph_print_header(const struct gp_header *gph, int be);
36void gph_set_header(struct gp_header *gph, uint32_t size, uint32_t load_addr,
37 int be);
38int gpimage_check_params(struct image_tool_params *params);
39#endif