/Linux-v5.10/drivers/net/ethernet/marvell/prestera/ |
D | prestera_pci.c | 75 #define PRESTERA_LDR_REG_BASE(fw) ((fw)->ldr_regs) argument 76 #define PRESTERA_LDR_REG_ADDR(fw, reg) (PRESTERA_LDR_REG_BASE(fw) + (reg)) argument 157 #define PRESTERA_FW_REG_BASE(fw) ((fw)->dev.ctl_regs) argument 158 #define PRESTERA_FW_REG_ADDR(fw, reg) PRESTERA_FW_REG_BASE((fw)) + (reg) argument 185 static int prestera_fw_load(struct prestera_fw *fw); 187 static void prestera_fw_write(struct prestera_fw *fw, u32 reg, u32 val) in prestera_fw_write() argument 189 writel(val, PRESTERA_FW_REG_ADDR(fw, reg)); in prestera_fw_write() 192 static u32 prestera_fw_read(struct prestera_fw *fw, u32 reg) in prestera_fw_read() argument 194 return readl(PRESTERA_FW_REG_ADDR(fw, reg)); in prestera_fw_read() 197 static u32 prestera_fw_evtq_len(struct prestera_fw *fw, u8 qid) in prestera_fw_evtq_len() argument [all …]
|
/Linux-v5.10/drivers/net/wireless/ralink/rt2x00/ |
D | rt2x00firmware.c | 23 const struct firmware *fw; in rt2x00lib_request_firmware() local 40 retval = request_firmware(&fw, fw_name, device); in rt2x00lib_request_firmware() 46 if (!fw || !fw->size || !fw->data) { in rt2x00lib_request_firmware() 48 release_firmware(fw); in rt2x00lib_request_firmware() 53 fw->data[fw->size - 4], fw->data[fw->size - 3]); in rt2x00lib_request_firmware() 56 fw->data[fw->size - 4], fw->data[fw->size - 3]); in rt2x00lib_request_firmware() 58 retval = rt2x00dev->ops->lib->check_firmware(rt2x00dev, fw->data, fw->size); in rt2x00lib_request_firmware() 67 fw->size); in rt2x00lib_request_firmware() 74 rt2x00dev->fw = fw; in rt2x00lib_request_firmware() 79 release_firmware(fw); in rt2x00lib_request_firmware() [all …]
|
/Linux-v5.10/drivers/firmware/ |
D | raspberrypi.c | 36 struct rpi_firmware *fw = container_of(cl, struct rpi_firmware, cl); in response_callback() local 37 complete(&fw->c); in response_callback() 45 rpi_firmware_transaction(struct rpi_firmware *fw, u32 chan, u32 data) in rpi_firmware_transaction() argument 53 reinit_completion(&fw->c); in rpi_firmware_transaction() 54 ret = mbox_send_message(fw->chan, &message); in rpi_firmware_transaction() 56 if (wait_for_completion_timeout(&fw->c, HZ)) { in rpi_firmware_transaction() 63 dev_err(fw->cl.dev, "mbox_send_message returned %d\n", ret); in rpi_firmware_transaction() 84 int rpi_firmware_property_list(struct rpi_firmware *fw, in rpi_firmware_property_list() argument 96 buf = dma_alloc_coherent(fw->cl.dev, PAGE_ALIGN(size), &bus_addr, in rpi_firmware_property_list() 110 ret = rpi_firmware_transaction(fw, MBOX_CHAN_PROPERTY, bus_addr); in rpi_firmware_property_list() [all …]
|
/Linux-v5.10/drivers/media/platform/mtk-vcodec/ |
D | mtk_vcodec_fw.c | 24 void mtk_vcodec_fw_release(struct mtk_vcodec_fw *fw) in mtk_vcodec_fw_release() argument 26 fw->ops->release(fw); in mtk_vcodec_fw_release() 30 int mtk_vcodec_fw_load_firmware(struct mtk_vcodec_fw *fw) in mtk_vcodec_fw_load_firmware() argument 32 return fw->ops->load_firmware(fw); in mtk_vcodec_fw_load_firmware() 36 unsigned int mtk_vcodec_fw_get_vdec_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_fw_get_vdec_capa() argument 38 return fw->ops->get_vdec_capa(fw); in mtk_vcodec_fw_get_vdec_capa() 42 unsigned int mtk_vcodec_fw_get_venc_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_fw_get_venc_capa() argument 44 return fw->ops->get_venc_capa(fw); in mtk_vcodec_fw_get_venc_capa() 48 void *mtk_vcodec_fw_map_dm_addr(struct mtk_vcodec_fw *fw, u32 mem_addr) in mtk_vcodec_fw_map_dm_addr() argument 50 return fw->ops->map_dm_addr(fw, mem_addr); in mtk_vcodec_fw_map_dm_addr() [all …]
|
D | mtk_vcodec_fw_scp.c | 7 static int mtk_vcodec_scp_load_firmware(struct mtk_vcodec_fw *fw) in mtk_vcodec_scp_load_firmware() argument 9 return rproc_boot(scp_get_rproc(fw->scp)); in mtk_vcodec_scp_load_firmware() 12 static unsigned int mtk_vcodec_scp_get_vdec_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_scp_get_vdec_capa() argument 14 return scp_get_vdec_hw_capa(fw->scp); in mtk_vcodec_scp_get_vdec_capa() 17 static unsigned int mtk_vcodec_scp_get_venc_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_scp_get_venc_capa() argument 19 return scp_get_venc_hw_capa(fw->scp); in mtk_vcodec_scp_get_venc_capa() 22 static void *mtk_vcodec_vpu_scp_dm_addr(struct mtk_vcodec_fw *fw, in mtk_vcodec_vpu_scp_dm_addr() argument 25 return scp_mapping_dm_addr(fw->scp, dtcm_dmem_addr); in mtk_vcodec_vpu_scp_dm_addr() 28 static int mtk_vcodec_scp_set_ipi_register(struct mtk_vcodec_fw *fw, int id, in mtk_vcodec_scp_set_ipi_register() argument 32 return scp_ipi_register(fw->scp, id, handler, priv); in mtk_vcodec_scp_set_ipi_register() [all …]
|
D | mtk_vcodec_fw_vpu.c | 7 static int mtk_vcodec_vpu_load_firmware(struct mtk_vcodec_fw *fw) in mtk_vcodec_vpu_load_firmware() argument 9 return vpu_load_firmware(fw->pdev); in mtk_vcodec_vpu_load_firmware() 12 static unsigned int mtk_vcodec_vpu_get_vdec_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_vpu_get_vdec_capa() argument 14 return vpu_get_vdec_hw_capa(fw->pdev); in mtk_vcodec_vpu_get_vdec_capa() 17 static unsigned int mtk_vcodec_vpu_get_venc_capa(struct mtk_vcodec_fw *fw) in mtk_vcodec_vpu_get_venc_capa() argument 19 return vpu_get_venc_hw_capa(fw->pdev); in mtk_vcodec_vpu_get_venc_capa() 22 static void *mtk_vcodec_vpu_map_dm_addr(struct mtk_vcodec_fw *fw, in mtk_vcodec_vpu_map_dm_addr() argument 25 return vpu_mapping_dm_addr(fw->pdev, dtcm_dmem_addr); in mtk_vcodec_vpu_map_dm_addr() 28 static int mtk_vcodec_vpu_set_ipi_register(struct mtk_vcodec_fw *fw, int id, in mtk_vcodec_vpu_set_ipi_register() argument 40 return vpu_ipi_register(fw->pdev, id, handler_const, name, priv); in mtk_vcodec_vpu_set_ipi_register() [all …]
|
/Linux-v5.10/drivers/gpu/host1x/ |
D | job.c | 355 static int check_register(struct host1x_firewall *fw, unsigned long offset) in check_register() argument 357 if (!fw->job->is_addr_reg) in check_register() 360 if (fw->job->is_addr_reg(fw->dev, fw->class, offset)) { in check_register() 361 if (!fw->num_relocs) in check_register() 364 if (!check_reloc(fw->reloc, fw->cmdbuf, fw->offset)) in check_register() 367 fw->num_relocs--; in check_register() 368 fw->reloc++; in check_register() 374 static int check_class(struct host1x_firewall *fw, u32 class) in check_class() argument 376 if (!fw->job->is_valid_class) { in check_class() 377 if (fw->class != class) in check_class() [all …]
|
/Linux-v5.10/drivers/net/wireless/ath/carl9170/ |
D | fw.c | 25 carl9170fw_for_each_hdr(iter, ar->fw.desc) { in carl9170_fw_find_desc() 195 ar->fw.tx_seq_table = le32_to_cpu(txsq_desc->seq_table_addr); in carl9170_fw_tx_sequence() 196 if (!valid_cpu_addr(ar->fw.tx_seq_table)) in carl9170_fw_tx_sequence() 199 ar->fw.tx_seq_table = 0; in carl9170_fw_tx_sequence() 208 if (ar->fw.vif_num < 2) in carl9170_fw_set_if_combinations() 211 ar->if_comb_limits[0].max = ar->fw.vif_num; in carl9170_fw_set_if_combinations() 215 ar->if_combs[0].max_interfaces = ar->fw.vif_num; in carl9170_fw_set_if_combinations() 248 ar->fw.api_version = otus_desc->api_ver; in carl9170_fw() 250 if (ar->fw.api_version < CARL9170FW_API_MIN_VER || in carl9170_fw() 251 ar->fw.api_version > CARL9170FW_API_MAX_VER) { in carl9170_fw() [all …]
|
/Linux-v5.10/drivers/nfc/s3fwrn5/ |
D | firmware.c | 285 struct s3fwrn5_fw_image *fw = &fw_info->fw; in s3fwrn5_fw_request_firmware() local 291 ret = request_firmware(&fw->fw, fw_info->fw_name, in s3fwrn5_fw_request_firmware() 296 if (fw->fw->size < S3FWRN5_FW_IMAGE_HEADER_SIZE) in s3fwrn5_fw_request_firmware() 299 memcpy(fw->date, fw->fw->data + 0x00, 12); in s3fwrn5_fw_request_firmware() 300 fw->date[12] = '\0'; in s3fwrn5_fw_request_firmware() 302 memcpy(&fw->version, fw->fw->data + 0x10, 4); in s3fwrn5_fw_request_firmware() 304 memcpy(&sig_off, fw->fw->data + 0x14, 4); in s3fwrn5_fw_request_firmware() 305 fw->sig = fw->fw->data + sig_off; in s3fwrn5_fw_request_firmware() 306 memcpy(&fw->sig_size, fw->fw->data + 0x18, 4); in s3fwrn5_fw_request_firmware() 308 memcpy(&image_off, fw->fw->data + 0x1C, 4); in s3fwrn5_fw_request_firmware() [all …]
|
/Linux-v5.10/drivers/firmware/meson/ |
D | meson_sm.c | 104 int meson_sm_call(struct meson_sm_firmware *fw, unsigned int cmd_index, in meson_sm_call() argument 109 if (!fw->chip) in meson_sm_call() 112 cmd = meson_sm_get_cmd(fw->chip, cmd_index); in meson_sm_call() 142 int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer, in meson_sm_call_read() argument 149 if (!fw->chip) in meson_sm_call_read() 152 if (!fw->chip->cmd_shmem_out_base) in meson_sm_call_read() 155 if (bsize > fw->chip->shmem_size) in meson_sm_call_read() 158 if (meson_sm_call(fw, cmd_index, &size, arg0, arg1, arg2, arg3, arg4) < 0) in meson_sm_call_read() 170 memcpy(buffer, fw->sm_shmem_out_base, size); in meson_sm_call_read() 191 int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer, in meson_sm_call_write() argument [all …]
|
/Linux-v5.10/drivers/scsi/qla2xxx/ |
D | qla_dbg.c | 734 struct qla2300_fw_dump *fw; in qla2300_fw_dump() local 753 fw = &ha->fw_dump->isp.isp23; in qla2300_fw_dump() 757 fw->hccr = htons(rd_reg_word(®->hccr)); in qla2300_fw_dump() 777 for (cnt = 0; cnt < ARRAY_SIZE(fw->pbiu_reg); cnt++, dmp_reg++) in qla2300_fw_dump() 778 fw->pbiu_reg[cnt] = htons(rd_reg_word(dmp_reg)); in qla2300_fw_dump() 781 for (cnt = 0; cnt < ARRAY_SIZE(fw->risc_host_reg); in qla2300_fw_dump() 783 fw->risc_host_reg[cnt] = htons(rd_reg_word(dmp_reg)); in qla2300_fw_dump() 786 for (cnt = 0; cnt < ARRAY_SIZE(fw->mailbox_reg); in qla2300_fw_dump() 788 fw->mailbox_reg[cnt] = htons(rd_reg_word(dmp_reg)); in qla2300_fw_dump() 791 qla2xxx_read_window(reg, 32, fw->resp_dma_reg); in qla2300_fw_dump() [all …]
|
/Linux-v5.10/drivers/remoteproc/ |
D | remoteproc_elf_loader.c | 35 int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw) argument 50 if (!fw) { 55 if (fw->size < sizeof(struct elf32_hdr)) { 60 ehdr = (struct elf32_hdr *)fw->data; 73 if (class == ELFCLASS64 && fw->size < sizeof(struct elf64_hdr)) { 88 phoff = elf_hdr_get_e_phoff(class, fw->data); 89 shoff = elf_hdr_get_e_shoff(class, fw->data); 90 phnum = elf_hdr_get_e_phnum(class, fw->data); 93 if (fw->size < shoff + elf_shdr_get_size) { 103 if (phoff > fw->size) { [all …]
|
D | remoteproc_internal.h | 91 int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw); 92 u64 rproc_elf_get_boot_addr(struct rproc *rproc, const struct firmware *fw); 93 int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw); 94 int rproc_elf_load_rsc_table(struct rproc *rproc, const struct firmware *fw); 96 const struct firmware *fw); 125 int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw) in rproc_fw_sanity_check() argument 128 return rproc->ops->sanity_check(rproc, fw); in rproc_fw_sanity_check() 134 u64 rproc_get_boot_addr(struct rproc *rproc, const struct firmware *fw) in rproc_get_boot_addr() argument 137 return rproc->ops->get_boot_addr(rproc, fw); in rproc_get_boot_addr() 143 int rproc_load_segments(struct rproc *rproc, const struct firmware *fw) in rproc_load_segments() argument [all …]
|
/Linux-v5.10/drivers/firmware/efi/ |
D | embedded-firmware.c | 40 struct efi_embedded_fw *fw; in efi_check_md_for_embedded_firmware() local 67 fw = kmalloc(sizeof(*fw), GFP_KERNEL); in efi_check_md_for_embedded_firmware() 68 if (!fw) { in efi_check_md_for_embedded_firmware() 73 fw->data = kmemdup(map + i, desc->length, GFP_KERNEL); in efi_check_md_for_embedded_firmware() 75 if (!fw->data) { in efi_check_md_for_embedded_firmware() 76 kfree(fw); in efi_check_md_for_embedded_firmware() 80 fw->name = desc->name; in efi_check_md_for_embedded_firmware() 81 fw->length = desc->length; in efi_check_md_for_embedded_firmware() 82 list_add(&fw->list, &efi_embedded_fw_list); in efi_check_md_for_embedded_firmware() 124 struct efi_embedded_fw *iter, *fw = NULL; in efi_get_embedded_fw() local [all …]
|
/Linux-v5.10/drivers/net/wireless/mediatek/mt76/mt76x2/ |
D | pci_mcu.c | 17 const struct firmware *fw = NULL; in mt76pci_load_rom_patch() local 43 ret = request_firmware(&fw, MT7662_ROM_PATCH, dev->mt76.dev); in mt76pci_load_rom_patch() 47 if (!fw || !fw->data || fw->size <= sizeof(*hdr)) { in mt76pci_load_rom_patch() 53 hdr = (struct mt76x02_patch_header *)fw->data; in mt76pci_load_rom_patch() 58 cur = (__le32 *)(fw->data + sizeof(*hdr)); in mt76pci_load_rom_patch() 59 len = fw->size - sizeof(*hdr); in mt76pci_load_rom_patch() 76 release_firmware(fw); in mt76pci_load_rom_patch() 83 const struct firmware *fw; in mt76pci_load_firmware() local 89 ret = request_firmware(&fw, MT7662_FIRMWARE, dev->mt76.dev); in mt76pci_load_firmware() 93 if (!fw || !fw->data || fw->size < sizeof(*hdr)) in mt76pci_load_firmware() [all …]
|
D | usb_mcu.c | 62 const struct firmware *fw; in mt76x2u_mcu_load_rom_patch() local 85 err = request_firmware(&fw, MT7662_ROM_PATCH, dev->mt76.dev); in mt76x2u_mcu_load_rom_patch() 89 if (!fw || !fw->data || fw->size <= sizeof(*hdr)) { in mt76x2u_mcu_load_rom_patch() 95 hdr = (struct mt76x02_patch_header *)fw->data; in mt76x2u_mcu_load_rom_patch() 119 err = mt76x02u_mcu_fw_send_data(dev, fw->data + sizeof(*hdr), in mt76x2u_mcu_load_rom_patch() 120 fw->size - sizeof(*hdr), in mt76x2u_mcu_load_rom_patch() 140 release_firmware(fw); in mt76x2u_mcu_load_rom_patch() 149 const struct firmware *fw; in mt76x2u_mcu_load_firmware() local 151 err = request_firmware(&fw, MT7662_FIRMWARE, dev->mt76.dev); in mt76x2u_mcu_load_firmware() 155 if (!fw || !fw->data || fw->size < sizeof(*hdr)) { in mt76x2u_mcu_load_firmware() [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ |
D | hsfw.c | 54 const struct firmware *fw; in nvkm_acr_hsfw_load_image() local 61 ret = nvkm_firmware_get(subdev, name, ver, &fw); in nvkm_acr_hsfw_load_image() 65 hdr = nvfw_bin_hdr(subdev, fw->data); in nvkm_acr_hsfw_load_image() 66 fwhdr = nvfw_hs_header(subdev, fw->data + hdr->header_offset); in nvkm_acr_hsfw_load_image() 74 loc = *(u32 *)(fw->data + fwhdr->patch_loc); in nvkm_acr_hsfw_load_image() 75 sig = *(u32 *)(fw->data + fwhdr->patch_sig); in nvkm_acr_hsfw_load_image() 86 lhdr = nvfw_hs_load_header(subdev, fw->data + fwhdr->hdr_offset); in nvkm_acr_hsfw_load_image() 93 memcpy(hsfw->image, fw->data + hdr->data_offset, hdr->data_size); in nvkm_acr_hsfw_load_image() 103 hsfw->sig.prod.data = kmemdup(fw->data + fwhdr->sig_prod_offset + sig, in nvkm_acr_hsfw_load_image() 111 hsfw->sig.dbg.data = kmemdup(fw->data + fwhdr->sig_dbg_offset + sig, in nvkm_acr_hsfw_load_image() [all …]
|
/Linux-v5.10/drivers/net/wireless/intel/iwlwifi/ |
D | iwl-drv.c | 112 struct iwl_fw fw; member 177 kfree(drv->fw.dbg.dest_tlv); in iwl_dealloc_ucode() 178 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg.conf_tlv); i++) in iwl_dealloc_ucode() 179 kfree(drv->fw.dbg.conf_tlv[i]); in iwl_dealloc_ucode() 180 for (i = 0; i < ARRAY_SIZE(drv->fw.dbg.trigger_tlv); i++) in iwl_dealloc_ucode() 181 kfree(drv->fw.dbg.trigger_tlv[i]); in iwl_dealloc_ucode() 182 kfree(drv->fw.dbg.mem_tlv); in iwl_dealloc_ucode() 183 kfree(drv->fw.iml); in iwl_dealloc_ucode() 184 kfree(drv->fw.ucode_capa.cmd_versions); in iwl_dealloc_ucode() 187 iwl_free_fw_img(drv, drv->fw.img + i); in iwl_dealloc_ucode() [all …]
|
/Linux-v5.10/drivers/net/wireless/intersil/orinoco/ |
D | fw.c | 98 const struct fw_info *fw, in orinoco_dl_firmware() argument 114 pda = kzalloc(fw->pda_size, GFP_KERNEL); in orinoco_dl_firmware() 119 firmware = fw->ap_fw; in orinoco_dl_firmware() 121 firmware = fw->sta_fw; in orinoco_dl_firmware() 126 err = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); in orinoco_dl_firmware() 175 &pda[fw->pda_size / sizeof(*pda)]); in orinoco_dl_firmware() 205 symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw, in symbol_dl_image() argument 224 pda = kzalloc(fw->pda_size, GFP_KERNEL); in symbol_dl_image() 228 ret = hw->ops->read_pda(hw, pda, fw->pda_addr, fw->pda_size); in symbol_dl_image() 250 &pda[fw->pda_size / sizeof(*pda)]); in symbol_dl_image() [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/nvkm/core/ |
D | firmware.c | 44 const struct firmware *fw; in nvkm_firmware_load_blob() local 47 ret = nvkm_firmware_load_name(subdev, base, name, ver, &fw); in nvkm_firmware_load_blob() 49 blob->data = kmemdup(fw->data, fw->size, GFP_KERNEL); in nvkm_firmware_load_blob() 50 blob->size = fw->size; in nvkm_firmware_load_blob() 51 nvkm_firmware_put(fw); in nvkm_firmware_load_blob() 70 const struct firmware **fw) in nvkm_firmware_get() argument 91 if (!firmware_request_nowarn(fw, f, device->dev)) { in nvkm_firmware_get() 93 f, (*fw)->size); in nvkm_firmware_get() 105 nvkm_firmware_put(const struct firmware *fw) in nvkm_firmware_put() argument 107 release_firmware(fw); in nvkm_firmware_put()
|
/Linux-v5.10/include/linux/ |
D | firmware.h | 42 int request_firmware(const struct firmware **fw, const char *name, 44 int firmware_request_nowarn(const struct firmware **fw, const char *name, 46 int firmware_request_platform(const struct firmware **fw, const char *name, 51 void (*cont)(const struct firmware *fw, void *context)); 52 int request_firmware_direct(const struct firmware **fw, const char *name, 60 void release_firmware(const struct firmware *fw); 62 static inline int request_firmware(const struct firmware **fw, in request_firmware() argument 69 static inline int firmware_request_nowarn(const struct firmware **fw, in firmware_request_nowarn() argument 76 static inline int firmware_request_platform(const struct firmware **fw, in firmware_request_platform() argument 86 void (*cont)(const struct firmware *fw, void *context)) in request_firmware_nowait() argument [all …]
|
/Linux-v5.10/drivers/net/wireless/intel/iwlwifi/fw/ |
D | img.c | 60 u8 iwl_fw_lookup_cmd_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def) in iwl_fw_lookup_cmd_ver() argument 65 if (!fw->ucode_capa.cmd_versions || in iwl_fw_lookup_cmd_ver() 66 !fw->ucode_capa.n_cmd_versions) in iwl_fw_lookup_cmd_ver() 69 entry = fw->ucode_capa.cmd_versions; in iwl_fw_lookup_cmd_ver() 70 for (i = 0; i < fw->ucode_capa.n_cmd_versions; i++, entry++) { in iwl_fw_lookup_cmd_ver() 82 u8 iwl_fw_lookup_notif_ver(const struct iwl_fw *fw, u8 grp, u8 cmd, u8 def) in iwl_fw_lookup_notif_ver() argument 87 if (!fw->ucode_capa.cmd_versions || in iwl_fw_lookup_notif_ver() 88 !fw->ucode_capa.n_cmd_versions) in iwl_fw_lookup_notif_ver() 91 entry = fw->ucode_capa.cmd_versions; in iwl_fw_lookup_notif_ver() 92 for (i = 0; i < fw->ucode_capa.n_cmd_versions; i++, entry++) { in iwl_fw_lookup_notif_ver()
|
/Linux-v5.10/drivers/net/ethernet/realtek/ |
D | r8169_firmware.c | 44 const struct firmware *fw = rtl_fw->fw; in rtl_fw_format_ok() local 45 struct fw_info *fw_info = (struct fw_info *)fw->data; in rtl_fw_format_ok() 48 if (fw->size < FW_OPCODE_SIZE) in rtl_fw_format_ok() 55 if (fw->size < sizeof(*fw_info)) in rtl_fw_format_ok() 58 for (i = 0; i < fw->size; i++) in rtl_fw_format_ok() 59 checksum += fw->data[i]; in rtl_fw_format_ok() 64 if (start > fw->size) in rtl_fw_format_ok() 68 if (size > (fw->size - start) / FW_OPCODE_SIZE) in rtl_fw_format_ok() 73 pa->code = (__le32 *)(fw->data + start); in rtl_fw_format_ok() 76 if (fw->size % FW_OPCODE_SIZE) in rtl_fw_format_ok() [all …]
|
/Linux-v5.10/drivers/net/wireless/intel/iwlwifi/pcie/ |
D | ctxt-info.c | 133 const struct fw_img *fw, in iwl_pcie_init_fw_sec() argument 144 lmac_cnt = iwl_pcie_get_num_sections(fw, 0); in iwl_pcie_init_fw_sec() 146 umac_cnt = iwl_pcie_get_num_sections(fw, lmac_cnt + 1); in iwl_pcie_init_fw_sec() 148 paging_cnt = iwl_pcie_get_num_sections(fw, lmac_cnt + umac_cnt + 2); in iwl_pcie_init_fw_sec() 150 dram->fw = kcalloc(umac_cnt + lmac_cnt, sizeof(*dram->fw), GFP_KERNEL); in iwl_pcie_init_fw_sec() 151 if (!dram->fw) in iwl_pcie_init_fw_sec() 159 ret = iwl_pcie_ctxt_info_alloc_dma(trans, fw->sec[i].data, in iwl_pcie_init_fw_sec() 160 fw->sec[i].len, in iwl_pcie_init_fw_sec() 161 &dram->fw[dram->fw_cnt]); in iwl_pcie_init_fw_sec() 165 cpu_to_le64(dram->fw[dram->fw_cnt].physical); in iwl_pcie_init_fw_sec() [all …]
|
/Linux-v5.10/drivers/soc/qcom/ |
D | mdt_loader.c | 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() [all …]
|