Lines Matching refs:aw_bin

25 static int aw_parse_bin_header(struct aw_device *aw_dev, struct aw_bin *bin);
27 static int aw_check_sum(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_sum()
53 static int aw_check_data_version(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_data_version()
64 static int aw_check_register_num(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_register_num()
91 static int aw_check_dsp_reg_num(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_dsp_reg_num()
122 static int aw_check_soc_app_num(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num) in aw_check_soc_app_num()
151 static void aw_get_single_bin_header(struct aw_bin *bin) in aw_get_single_bin_header()
160 int bin_serial_num, struct aw_bin *bin) in aw_parse_one_of_multi_bins()
190 static int aw_get_multi_bin_header(struct aw_device *aw_dev, struct aw_bin *bin) in aw_get_multi_bin_header()
212 static int aw_parse_bin_header(struct aw_device *aw_dev, struct aw_bin *bin) in aw_parse_bin_header()
247 static int aw_check_bin_header_version(struct aw_device *aw_dev, struct aw_bin *bin) in aw_check_bin_header_version()
263 static int aw_parsing_bin_file(struct aw_device *aw_dev, struct aw_bin *bin) in aw_parsing_bin_file()
368 struct aw_bin *aw_bin __free(kfree) = kzalloc(data_len + sizeof(struct aw_bin), in aw_dev_prof_parse_multi_bin()
370 if (!aw_bin) in aw_dev_prof_parse_multi_bin()
373 aw_bin->info.len = data_len; in aw_dev_prof_parse_multi_bin()
374 memcpy(aw_bin->info.data, data, data_len); in aw_dev_prof_parse_multi_bin()
376 ret = aw_parsing_bin_file(aw_dev, aw_bin); in aw_dev_prof_parse_multi_bin()
382 for (i = 0; i < aw_bin->all_bin_parse_num; i++) { in aw_dev_prof_parse_multi_bin()
383 switch (aw_bin->header_info[i].bin_data_type) { in aw_dev_prof_parse_multi_bin()
386 aw_bin->header_info[i].valid_data_len; in aw_dev_prof_parse_multi_bin()
388 data + aw_bin->header_info[i].valid_data_addr; in aw_dev_prof_parse_multi_bin()
391 if (aw_bin->header_info[i].valid_data_len & 0x01) in aw_dev_prof_parse_multi_bin()
394 swab16_array((u16 *)(data + aw_bin->header_info[i].valid_data_addr), in aw_dev_prof_parse_multi_bin()
395 aw_bin->header_info[i].valid_data_len >> 1); in aw_dev_prof_parse_multi_bin()
398 aw_bin->header_info[i].valid_data_len; in aw_dev_prof_parse_multi_bin()
400 data + aw_bin->header_info[i].valid_data_addr; in aw_dev_prof_parse_multi_bin()
404 if (aw_bin->header_info[i].valid_data_len & 0x01) in aw_dev_prof_parse_multi_bin()
407 swab16_array((u16 *)(data + aw_bin->header_info[i].valid_data_addr), in aw_dev_prof_parse_multi_bin()
408 aw_bin->header_info[i].valid_data_len >> 1); in aw_dev_prof_parse_multi_bin()
410 prof_desc->fw_ver = aw_bin->header_info[i].app_version; in aw_dev_prof_parse_multi_bin()
412 aw_bin->header_info[i].valid_data_len; in aw_dev_prof_parse_multi_bin()
414 data + aw_bin->header_info[i].valid_data_addr; in aw_dev_prof_parse_multi_bin()
431 struct aw_bin *aw_bin __free(kfree) = kzalloc(data_len + sizeof(*aw_bin), in aw_dev_parse_reg_bin_with_hdr()
433 if (!aw_bin) in aw_dev_parse_reg_bin_with_hdr()
436 aw_bin->info.len = data_len; in aw_dev_parse_reg_bin_with_hdr()
437 memcpy(aw_bin->info.data, data, data_len); in aw_dev_parse_reg_bin_with_hdr()
439 ret = aw_parsing_bin_file(aw_dev, aw_bin); in aw_dev_parse_reg_bin_with_hdr()
445 if ((aw_bin->all_bin_parse_num != 1) || in aw_dev_parse_reg_bin_with_hdr()
446 (aw_bin->header_info[0].bin_data_type != DATA_TYPE_REGISTER)) { in aw_dev_parse_reg_bin_with_hdr()
452 data + aw_bin->header_info[0].valid_data_addr; in aw_dev_parse_reg_bin_with_hdr()
454 aw_bin->header_info[0].valid_data_len; in aw_dev_parse_reg_bin_with_hdr()