]> git.sur5r.net Git - u-boot/blob - tools/rkcommon.h
rockchip: Add max spl size & spl header configs
[u-boot] / tools / rkcommon.h
1 /*
2  * (C) Copyright 2015 Google,  Inc
3  * Written by Simon Glass <sjg@chromium.org>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #ifndef _RKCOMMON_H
9 #define _RKCOMMON_H
10
11 enum {
12         RK_BLK_SIZE             = 512,
13         RK_CODE1_OFFSET         = 4,
14 };
15
16 /**
17  * rkcommon_set_header() - set up the header for a Rockchip boot image
18  *
19  * This sets up a 2KB header which can be interpreted by the Rockchip boot ROM.
20  *
21  * @buf:        Pointer to header place (must be at least 2KB in size)
22  * @file_size:  Size of the file we want the boot ROM to load, in bytes
23  * @return 0 if OK, -ENOSPC if too large
24  */
25 int rkcommon_set_header(void *buf, uint file_size);
26
27 #endif