diff options
author | Tom Rini <trini@konsulko.com> | 2015-09-03 14:57:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-09-03 14:57:09 -0400 |
commit | c9feb427aba860ebc79f9851a1bb49cc456a2d48 (patch) | |
tree | 6a80def1806386e2854d57f740264c6744d96e1d /tools/rkcommon.h | |
parent | da9d8580ff9ce17452ef931072e5799a9df8807f (diff) | |
parent | f2acc55e3d28e96a6fcc060a7081eb4e2ad96350 (diff) | |
download | u-boot-c9feb427aba860ebc79f9851a1bb49cc456a2d48.zip u-boot-c9feb427aba860ebc79f9851a1bb49cc456a2d48.tar.gz u-boot-c9feb427aba860ebc79f9851a1bb49cc456a2d48.tar.bz2 |
Merge git://git.denx.de/u-boot-rockchip
Diffstat (limited to 'tools/rkcommon.h')
-rw-r--r-- | tools/rkcommon.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/rkcommon.h b/tools/rkcommon.h new file mode 100644 index 0000000..57fd726 --- /dev/null +++ b/tools/rkcommon.h @@ -0,0 +1,28 @@ +/* + * (C) Copyright 2015 Google, Inc + * Written by Simon Glass <sjg@chromium.org> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _RKCOMMON_H +#define _RKCOMMON_H + +enum { + RK_BLK_SIZE = 512, + RK_CODE1_OFFSET = 4, + RK_MAX_CODE1_SIZE = 32 << 10, +}; + +/** + * rkcommon_set_header() - set up the header for a Rockchip boot image + * + * This sets up a 2KB header which can be interpreted by the Rockchip boot ROM. + * + * @buf: Pointer to header place (must be at least 2KB in size) + * @file_size: Size of the file we want the boot ROM to load, in bytes + * @return 0 if OK, -ENOSPC if too large + */ +int rkcommon_set_header(void *buf, uint file_size); + +#endif |