Lines Matching refs:bin_num

27 static int aw_check_sum(struct aw_device *aw_dev, struct aw_bin *bin, int bin_num)  in aw_check_sum()  argument
34 p_check_sum = &(bin->info.data[(bin->header_info[bin_num].valid_data_addr - in aw_check_sum()
35 bin->header_info[bin_num].header_len)]); in aw_check_sum()
36 len = bin->header_info[bin_num].bin_data_len + bin->header_info[bin_num].header_len; in aw_check_sum()
46 __func__, bin_num, check_sum, sum_data); 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() argument
55 if (bin->header_info[bin_num].bin_data_ver < DATA_VERSION_V1 || in aw_check_data_version()
56 bin->header_info[bin_num].bin_data_ver > DATA_VERSION_MAX) { 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() argument
66 struct bin_header_info temp_info = bin->header_info[bin_num]; in aw_check_register_num()
73 check_register_num = (bin->header_info[bin_num].bin_data_len - CHECK_REGISTER_NUM_OFFSET) / in aw_check_register_num()
74 (bin->header_info[bin_num].reg_byte_len + in aw_check_register_num()
75 bin->header_info[bin_num].data_byte_len); in aw_check_register_num()
84 bin->header_info[bin_num].reg_num = parse_register_num; in aw_check_register_num()
85 bin->header_info[bin_num].valid_data_len = temp_info.bin_data_len - VALID_DATA_LEN; in aw_check_register_num()
86 bin->header_info[bin_num].valid_data_addr = temp_info.valid_data_addr + VALID_DATA_ADDR; 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() argument
93 struct bin_header_info temp_info = bin->header_info[bin_num]; in aw_check_dsp_reg_num()
100 bin->header_info[bin_num].reg_data_byte_len = in aw_check_dsp_reg_num()
102 check_dsp_reg_num = (bin->header_info[bin_num].bin_data_len - CHECK_DSP_REG_NUM) / in aw_check_dsp_reg_num()
103 bin->header_info[bin_num].reg_data_byte_len; in aw_check_dsp_reg_num()
105 __func__, bin_num, check_dsp_reg_num, check_dsp_reg_num); in aw_check_dsp_reg_num()
113 bin->header_info[bin_num].download_addr = le32_to_cpup((void *)p_check_sum); in aw_check_dsp_reg_num()
114 bin->header_info[bin_num].reg_num = parse_dsp_reg_num; in aw_check_dsp_reg_num()
115 bin->header_info[bin_num].valid_data_len = temp_info.bin_data_len - DSP_VALID_DATA_LEN; in aw_check_dsp_reg_num()
116 bin->header_info[bin_num].valid_data_addr = temp_info.valid_data_addr + 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() argument
124 struct bin_header_info temp_info = bin->header_info[bin_num]; in aw_check_soc_app_num()
130 bin->header_info[bin_num].app_version = le32_to_cpup((void *)p_check_sum); in aw_check_soc_app_num()
132 check_soc_app_num = bin->header_info[bin_num].bin_data_len - CHECK_SOC_APP_NUM; in aw_check_soc_app_num()
134 __func__, bin_num, parse_soc_app_num, check_soc_app_num); in aw_check_soc_app_num()
141 bin->header_info[bin_num].reg_num = parse_soc_app_num; in aw_check_soc_app_num()
142 bin->header_info[bin_num].download_addr = le32_to_cpup((void *)(p_check_sum + in aw_check_soc_app_num()
144 bin->header_info[bin_num].valid_data_len = temp_info.bin_data_len - APP_VALID_DATA_LEN; in aw_check_soc_app_num()
145 bin->header_info[bin_num].valid_data_addr = temp_info.valid_data_addr + in aw_check_soc_app_num()
159 static int aw_parse_one_of_multi_bins(struct aw_device *aw_dev, unsigned int bin_num, in aw_parse_one_of_multi_bins() argument
177 aw_bin_header_info.valid_data_addr + VALID_DATA_ADDR + 8 * bin_num + in aw_parse_one_of_multi_bins()
192 unsigned int bin_num, i; in aw_get_multi_bin_header() local
195 bin_num = le32_to_cpup((void *)(bin->p_addr + VALID_DATA_ADDR_OFFSET)); in aw_get_multi_bin_header()
202 for (i = 0; i < bin_num; i++) { in aw_get_multi_bin_header()
204 ret = aw_parse_one_of_multi_bins(aw_dev, bin_num, i, bin); in aw_get_multi_bin_header()