1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __QCOM_MDT_LOADER_H__
3 #define __QCOM_MDT_LOADER_H__
4 
5 #include <linux/types.h>
6 
7 #define QCOM_MDT_TYPE_MASK	(7 << 24)
8 #define QCOM_MDT_TYPE_HASH	(2 << 24)
9 #define QCOM_MDT_RELOCATABLE	BIT(27)
10 
11 struct device;
12 struct firmware;
13 
14 ssize_t qcom_mdt_get_size(const struct firmware *fw);
15 int qcom_mdt_load(struct device *dev, const struct firmware *fw,
16 		  const char *fw_name, int pas_id, void *mem_region,
17 		  phys_addr_t mem_phys, size_t mem_size,
18 		  phys_addr_t *reloc_base);
19 
20 int qcom_mdt_load_no_init(struct device *dev, const struct firmware *fw,
21 			  const char *fw_name, int pas_id, void *mem_region,
22 			  phys_addr_t mem_phys, size_t mem_size,
23 			  phys_addr_t *reloc_base);
24 void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len);
25 
26 #endif
27