Lines Matching refs:fw

40 ssize_t qcom_mdt_get_size(const struct firmware *fw)  in qcom_mdt_get_size()  argument
49 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_get_size()
86 void *qcom_mdt_read_metadata(const struct firmware *fw, size_t *data_len) in qcom_mdt_read_metadata() argument
95 ehdr = (struct elf32_hdr *)fw->data; in qcom_mdt_read_metadata()
115 if (ehdr_size + hash_size == fw->size) in qcom_mdt_read_metadata()
120 memcpy(data, fw->data, ehdr_size); in qcom_mdt_read_metadata()
121 memcpy(data + ehdr_size, fw->data + hash_offset, hash_size); in qcom_mdt_read_metadata()
129 static int __qcom_mdt_load(struct device *dev, const struct firmware *fw, in __qcom_mdt_load() argument
151 if (!fw || !mem_region || !mem_phys || !mem_size) in __qcom_mdt_load()
154 ehdr = (struct elf32_hdr *)fw->data; in __qcom_mdt_load()
166 metadata = qcom_mdt_read_metadata(fw, &metadata_len); in __qcom_mdt_load()
235 if (phdr->p_filesz && phdr->p_offset < fw->size) { in __qcom_mdt_load()
237 if (phdr->p_offset + phdr->p_filesz > fw->size) { in __qcom_mdt_load()
245 memcpy(ptr, fw->data + phdr->p_offset, phdr->p_filesz); in __qcom_mdt_load()
285 int qcom_mdt_load(struct device *dev, const struct firmware *fw, in qcom_mdt_load() argument
290 return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys, in qcom_mdt_load()
308 int qcom_mdt_load_no_init(struct device *dev, const struct firmware *fw, in qcom_mdt_load_no_init() argument
313 return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys, in qcom_mdt_load_no_init()