Lines Matching refs:fw_hdr

177 	if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) {  in tasdevice_add_config()
277 struct tasdevice_rca_hdr *fw_hdr; in tasdevice_rca_parser() local
286 fw_hdr = &(rca->fw_hdr); in tasdevice_rca_parser()
296 fw_hdr->img_sz = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
298 if (fw_hdr->img_sz != fmw->size) { in tasdevice_rca_parser()
301 fw_hdr->img_sz); in tasdevice_rca_parser()
307 fw_hdr->checksum = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
309 fw_hdr->binary_version_num = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
310 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_rca_parser()
312 fw_hdr->binary_version_num); in tasdevice_rca_parser()
318 fw_hdr->drv_fw_version = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
320 fw_hdr->plat_type = buf[offset]; in tasdevice_rca_parser()
322 fw_hdr->dev_family = buf[offset]; in tasdevice_rca_parser()
324 fw_hdr->reserve = buf[offset]; in tasdevice_rca_parser()
326 fw_hdr->ndev = buf[offset]; in tasdevice_rca_parser()
328 if (fw_hdr->ndev != tas_priv->ndev) { in tasdevice_rca_parser()
331 fw_hdr->ndev, tas_priv->ndev); in tasdevice_rca_parser()
336 if (offset + TASDEVICE_DEVICE_SUM > fw_hdr->img_sz) { in tasdevice_rca_parser()
344 fw_hdr->devs[i] = buf[offset]; in tasdevice_rca_parser()
346 fw_hdr->nconfig = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
350 fw_hdr->config_size[i] = get_unaligned_be32(&buf[offset]); in tasdevice_rca_parser()
352 total_config_sz += fw_hdr->config_size[i]; in tasdevice_rca_parser()
355 if (fw_hdr->img_sz - total_config_sz != (unsigned int)offset) { in tasdevice_rca_parser()
362 cfg_info = kcalloc(fw_hdr->nconfig, sizeof(*cfg_info), GFP_KERNEL); in tasdevice_rca_parser()
370 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_rca_parser()
373 fw_hdr->config_size[i], &ret); in tasdevice_rca_parser()
378 offset += (int)fw_hdr->config_size[i]; in tasdevice_rca_parser()
392 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr); in map_dev_idx() local
393 struct tasdevice_fw_fixed_hdr *fw_fixed_hdr = &(fw_hdr->fixed_hdr); in map_dev_idx()
691 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr); in fw_parse_variable_header_kernel() local
703 fw_hdr->device_family = get_unaligned_be16(&buf[offset]); in fw_parse_variable_header_kernel()
704 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
710 fw_hdr->device = get_unaligned_be16(&buf[offset]); in fw_parse_variable_header_kernel()
711 if (fw_hdr->device >= TASDEVICE_DSP_TAS_MAX_DEVICE || in fw_parse_variable_header_kernel()
712 fw_hdr->device == 6) { in fw_parse_variable_header_kernel()
713 dev_err(tas_priv->dev, "Unsupported dev %d\n", fw_hdr->device); in fw_parse_variable_header_kernel()
718 fw_hdr->ndev = deviceNumber[fw_hdr->device]; in fw_parse_variable_header_kernel()
720 if (fw_hdr->ndev != tas_priv->ndev) { in fw_parse_variable_header_kernel()
723 __func__, fw_hdr->ndev, tas_priv->ndev); in fw_parse_variable_header_kernel()
761 max_confs = (fw_hdr->ndev >= 4) ? in fw_parse_variable_header_kernel()
1024 *tas_priv, struct tasdevice_dspfw_hdr *fw_hdr, in fw_parse_variable_hdr() argument
1040 fw_hdr->device_family = get_unaligned_be32(&buf[offset]); in fw_parse_variable_hdr()
1041 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
1048 fw_hdr->device = get_unaligned_be32(&buf[offset]); in fw_parse_variable_hdr()
1049 if (fw_hdr->device >= TASDEVICE_DSP_TAS_MAX_DEVICE || in fw_parse_variable_hdr()
1050 fw_hdr->device == 6) { in fw_parse_variable_hdr()
1051 dev_err(tas_priv->dev, "Unsupported dev %d\n", fw_hdr->device); in fw_parse_variable_hdr()
1056 fw_hdr->ndev = deviceNumber[fw_hdr->device]; in fw_parse_variable_hdr()
1066 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr); in fw_parse_variable_header_git() local
1068 offset = fw_parse_variable_hdr(tas_priv, fw_hdr, fmw, offset); in fw_parse_variable_header_git()
1071 if (fw_hdr->ndev != tas_priv->ndev) { in fw_parse_variable_header_git()
1074 __func__, fw_hdr->ndev, tas_priv->ndev); in fw_parse_variable_header_git()
1096 if (tas_fmw->fw_hdr.fixed_hdr.drv_ver >= PPC_DRIVER_CRCCHK) { in fw_parse_block_data()
1902 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr); in fw_parse_header() local
1903 struct tasdevice_fw_fixed_hdr *fw_fixed_hdr = &(fw_hdr->fixed_hdr); in fw_parse_header()
1943 struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr); in fw_parse_variable_hdr_cal() local
1945 offset = fw_parse_variable_hdr(tas_priv, fw_hdr, fmw, offset); in fw_parse_variable_hdr_cal()
1948 if (fw_hdr->ndev != 1) { in fw_parse_variable_hdr_cal()
1951 __func__, fw_hdr->ndev); in fw_parse_variable_hdr_cal()
2119 fw_fixed_hdr = &(tas_fmw->fw_hdr.fixed_hdr); in tasdevice_dspfw_ready()