xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-rockchip/resource_img.h (revision bc4ccd53961bed2da082b87773fb2a22f2552909)
1 /*
2  * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #ifndef __RESC_IMG_H_
8 #define __RESC_IMG_H_
9 
10 /*
11  * rockchip_read_resource_file - read file from resource partition
12  *
13  * @buf: destination buf to store file data
14  * @name: file name
15  * @offset: blocks offset in the file, 1 block = 512 bytes
16  * @len: the size(by bytes) of file to read.
17  *
18  * return negative num on failed, otherwise the file size
19  */
20 int rockchip_read_resource_file(void *buf, const char *name, int offset, int len);
21 
22 /*
23  * rockchip_read_resource_dtb() - read dtb file
24  *
25  * @fdt_addr: destination buf to store dtb file
26  * @hash: hash value buffer
27  * @hash_size: hash value length
28  */
29 int rockchip_read_resource_dtb(void *fdt_addr, char **hash, int *hash_size);
30 #endif
31