xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-rockchip/resource_img.h (revision 3a5e7a93e84cf9daaf64cdb8da670e94766e53f7)
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_get_resource_file_size() - read file size
24  *
25  * @fdt_addr: destination buf to store dtb file
26  *
27  * @return 0 on success, othwise on error
28  */
29 int rockchip_read_dtb_file(void *fdt_addr);
30 #endif
31