Lines Matching +full:0 +full:x0000001
25 #define ERROR_PRAM_CRCCHK 0x0000000
26 #define ERROR_YRAM_CRCCHK 0x0000001
27 #define PPC_DRIVER_CRCCHK 0x00000200
29 #define TAS2781_SA_COEFF_SWAP_REG TASDEVICE_REG(0, 0x35, 0x2c)
44 #define TAS2781_YRAM_BOOK2 0
55 #define MAIN_ALL_DEVICES_1X 0x01
56 #define MAIN_DEVICE_A_1X 0x02
57 #define MAIN_DEVICE_B_1X 0x03
58 #define MAIN_DEVICE_C_1X 0x04
59 #define MAIN_DEVICE_D_1X 0x05
60 #define COEFF_DEVICE_A_1X 0x12
61 #define COEFF_DEVICE_B_1X 0x13
62 #define COEFF_DEVICE_C_1X 0x14
63 #define COEFF_DEVICE_D_1X 0x15
64 #define PRE_DEVICE_A_1X 0x22
65 #define PRE_DEVICE_B_1X 0x23
66 #define PRE_DEVICE_C_1X 0x24
67 #define PRE_DEVICE_D_1X 0x25
68 #define PRE_SOFTWARE_RESET_DEVICE_A 0x41
69 #define PRE_SOFTWARE_RESET_DEVICE_B 0x42
70 #define PRE_SOFTWARE_RESET_DEVICE_C 0x43
71 #define PRE_SOFTWARE_RESET_DEVICE_D 0x44
72 #define POST_SOFTWARE_RESET_DEVICE_A 0x45
73 #define POST_SOFTWARE_RESET_DEVICE_B 0x46
74 #define POST_SOFTWARE_RESET_DEVICE_C 0x47
75 #define POST_SOFTWARE_RESET_DEVICE_D 0x48
88 1, 2, 1, 2, 1, 1, 0, 2, 4, 3, 1, 2, 3, 4
93 { MAIN_ALL_DEVICES_1X, 0x80 },
94 { MAIN_DEVICE_A_1X, 0x81 },
95 { COEFF_DEVICE_A_1X, 0xC1 },
96 { PRE_DEVICE_A_1X, 0xC1 },
97 { PRE_SOFTWARE_RESET_DEVICE_A, 0xC1 },
98 { POST_SOFTWARE_RESET_DEVICE_A, 0xC1 },
99 { MAIN_DEVICE_B_1X, 0x82 },
100 { COEFF_DEVICE_B_1X, 0xC2 },
101 { PRE_DEVICE_B_1X, 0xC2 },
102 { PRE_SOFTWARE_RESET_DEVICE_B, 0xC2 },
103 { POST_SOFTWARE_RESET_DEVICE_B, 0xC2 },
104 { MAIN_DEVICE_C_1X, 0x83 },
105 { COEFF_DEVICE_C_1X, 0xC3 },
106 { PRE_DEVICE_C_1X, 0xC3 },
107 { PRE_SOFTWARE_RESET_DEVICE_C, 0xC3 },
108 { POST_SOFTWARE_RESET_DEVICE_C, 0xC3 },
109 { MAIN_DEVICE_D_1X, 0x84 },
110 { COEFF_DEVICE_D_1X, 0xC4 },
111 { PRE_DEVICE_D_1X, 0xC4 },
112 { PRE_SOFTWARE_RESET_DEVICE_D, 0xC4 },
113 { POST_SOFTWARE_RESET_DEVICE_D, 0xC4 },
117 { MAIN_ALL_DEVICES_1X, 0x80 },
118 { MAIN_DEVICE_A_1X, 0x81 },
119 { COEFF_DEVICE_A_1X, 0xC1 },
120 { PRE_DEVICE_A_1X, 0xC1 },
121 { MAIN_DEVICE_B_1X, 0x82 },
122 { COEFF_DEVICE_B_1X, 0xC2 },
123 { PRE_DEVICE_B_1X, 0xC2 },
124 { MAIN_DEVICE_C_1X, 0x83 },
125 { COEFF_DEVICE_C_1X, 0xC3 },
126 { PRE_DEVICE_C_1X, 0xC3 },
127 { MAIN_DEVICE_D_1X, 0x84 },
128 { COEFF_DEVICE_D_1X, 0xC4 },
129 { PRE_DEVICE_D_1X, 0xC4 },
133 { MAIN_ALL_DEVICES, 0x80 },
134 { MAIN_DEVICE_A, 0x81 },
135 { COEFF_DEVICE_A, 0xC1 },
136 { PRE_DEVICE_A, 0xC1 },
137 { MAIN_DEVICE_B, 0x82 },
138 { COEFF_DEVICE_B, 0xC2 },
139 { PRE_DEVICE_B, 0xC2 },
140 { MAIN_DEVICE_C, 0x83 },
141 { COEFF_DEVICE_C, 0xC3 },
142 { PRE_DEVICE_C, 0xC3 },
143 { MAIN_DEVICE_D, 0x84 },
144 { COEFF_DEVICE_D, 0xC4 },
145 { PRE_DEVICE_D, 0xC4 },
154 unsigned int config_offset = 0; in tasdevice_add_config()
171 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
202 cfg_info->real_nblocks = 0; in tasdevice_add_config()
203 for (i = 0; i < cfg_info->nblocks; i++) { in tasdevice_add_config()
224 if (bk_da[i]->dev_idx == 0) in tasdevice_add_config()
273 unsigned int total_config_sz = 0; in tasdevice_rca_parser()
275 int offset = 0; in tasdevice_rca_parser()
276 int ret = 0; in tasdevice_rca_parser()
304 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_rca_parser()
305 dev_err(tas_priv->dev, "File version 0x%04x is too low", in tasdevice_rca_parser()
337 for (i = 0; i < TASDEVICE_DEVICE_SUM; i++, offset++) in tasdevice_rca_parser()
343 for (i = 0; i < TASDEVICE_CONFIG_SUM; i++) { in tasdevice_rca_parser()
363 rca->ncfgs = 0; in tasdevice_rca_parser()
364 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_rca_parser()
390 unsigned char dev_idx = 0; in map_dev_idx()
400 for (i = 0; i < n; i++) { in map_dev_idx()
493 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data_kernel()
496 if (offset < 0) { in fw_parse_data_kernel()
513 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data_kernel()
525 if (offset < 0) in fw_parse_program_data_kernel()
541 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data_kernel()
554 if (offset < 0) in fw_parse_configuration_data_kernel()
580 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
607 if (tas_fmw->nr_programs == 0 || tas_fmw->nr_programs > in fw_parse_variable_header_kernel()
621 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
640 if (tas_fmw->nr_configurations == 0 || in fw_parse_variable_header_kernel()
660 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
679 int blktyp = dev_idx & 0xC0; in tasdevice_process_block()
680 int idx = dev_idx & 0x3F; in tasdevice_process_block()
687 chn = 0; in tasdevice_process_block()
710 for (i = 0; i < len; i++) { in tasdevice_process_block()
716 if (rc < 0) { in tasdevice_process_block()
748 if (rc < 0) { in tasdevice_process_block()
758 unsigned int sleep_time = 0; in tasdevice_process_block()
786 if (rc < 0) { in tasdevice_process_block()
797 if (is_err == true && blktyp != 0) { in tasdevice_process_block()
798 if (blktyp == 0x80) { in tasdevice_process_block()
818 if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { in tasdevice_select_cfg_blk()
825 for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) { in tasdevice_select_cfg_blk()
826 unsigned int length = 0, rc = 0; in tasdevice_select_cfg_blk()
836 for (k = 0; k < (int)blk_data[j]->n_subblks; k++) { in tasdevice_select_cfg_blk()
841 chn = 0; in tasdevice_select_cfg_blk()
874 for (i = 0, length = 0; i < block->nr_subblocks; i++) { in tasdevice_load_block_kernel()
877 if (rc < 0) { in tasdevice_load_block_kernel()
891 return 0; in tasdevice_load_block_kernel()
912 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
940 if (offset < 0) in fw_parse_variable_header_git()
985 block->is_pchksum_present = 0; in fw_parse_block_data()
986 block->is_ychksum_present = 0; in fw_parse_block_data()
1049 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data()
1052 if (offset < 0) { in fw_parse_data()
1080 if (tas_fmw->nr_programs == 0) { in fw_parse_program_data()
1094 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data()
1095 int n = 0; in fw_parse_program_data()
1106 /* skip '\0' and 5 unused bytes */ in fw_parse_program_data()
1118 if (offset < 0) in fw_parse_program_data()
1147 if (tas_fmw->nr_configurations == 0) { in fw_parse_configuration_data()
1158 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data()
1180 if (offset < 0) in fw_parse_configuration_data()
1314 unsigned char crc_chksum = 0; in tasdev_multibytes_chksum()
1316 int ret = 0; in tasdev_multibytes_chksum()
1331 ret = 0; in tasdev_multibytes_chksum()
1348 if (ret < 0) in tasdev_multibytes_chksum()
1351 for (i = 0; i < crc_data.len; i++) { in tasdev_multibytes_chksum()
1364 1, 0); in tasdev_multibytes_chksum()
1379 int ret = 0; in do_singlereg_checksum()
1388 ret = 0; in do_singlereg_checksum()
1397 if (ret < 0) in do_singlereg_checksum()
1402 "B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n", in do_singlereg_checksum()
1409 ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0); in do_singlereg_checksum()
1439 if (ret > 0) { in tasdev_bytes_chksum()
1448 if (block->nr_retry > 0) in tasdev_bytes_chksum()
1468 if (ret < 0) in tasdev_multibytes_wr()
1472 book, page, reg, len, 0, crc_chksum); in tasdev_multibytes_wr()
1476 if (ret < 0) in tasdev_multibytes_wr()
1483 if (!block->is_ychksum_present || ret >= 0) { in tasdev_multibytes_wr()
1501 if (ret < 0) { in tasdev_block_chksum()
1507 if ((nr_value & 0xff) != block->pchksum) { in tasdev_block_chksum()
1510 dev_err(tas_priv->dev, "PChkSum = 0x%x, Reg = 0x%x\n", in tasdev_block_chksum()
1511 block->pchksum, (nr_value & 0xff)); in tasdev_block_chksum()
1516 if (block->nr_retry <= 0) in tasdev_block_chksum()
1533 unsigned char crc_chksum = 0; in tasdev_load_blk()
1538 int ret = 0; in tasdev_load_blk()
1540 while (block->nr_retry > 0) { in tasdev_load_blk()
1543 TASDEVICE_I2CChecksum, 0); in tasdev_load_blk()
1544 if (ret < 0) in tasdev_load_blk()
1549 crc_chksum = 0; in tasdev_load_blk()
1551 nr_cmds = 0; in tasdev_load_blk()
1556 book = data[0]; in tasdev_load_blk()
1563 if (offset <= 0x7F) { in tasdev_load_blk()
1567 if (ret < 0) in tasdev_load_blk()
1573 if (ret < 0) in tasdev_load_blk()
1579 if (offset == 0x81) { in tasdev_load_blk()
1580 /*book -- data[0] page -- data[1]*/ in tasdev_load_blk()
1586 if (offset == 0x85) { in tasdev_load_blk()
1589 book = data[0]; in tasdev_load_blk()
1595 if (ret < 0) in tasdev_load_blk()
1600 if (block->nr_retry > 0) in tasdev_load_blk()
1602 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1608 if (block->nr_retry > 0) in tasdev_load_blk()
1610 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1617 "Blk YChkSum: FW = 0x%x, YCRC = 0x%x\n", in tasdev_load_blk()
1622 ret = 0; in tasdev_load_blk()
1635 int chnend = 0; in tasdevice_load_block()
1636 int ret = 0; in tasdevice_load_block()
1637 int chn = 0; in tasdevice_load_block()
1638 int rc = 0; in tasdevice_load_block()
1642 chn = 0; in tasdevice_load_block()
1648 chn = 0; in tasdevice_load_block()
1670 dev_dbg(tas_priv->dev, "load blk: Other Type = 0x%02x\n", in tasdevice_load_block()
1680 if (ret < 0) in tasdevice_load_block()
1692 int rc = 0; in dspfw_default_callback()
1694 if (drv_ver == 0x100) { in dspfw_default_callback()
1706 case 0x00: in dspfw_default_callback()
1718 "%s: PPCVer must be 0x0 or 0x%02x", in dspfw_default_callback()
1720 dev_err(tas_priv->dev, " Current:0x%02x\n", in dspfw_default_callback()
1728 "DrvVer must be 0x0, 0x230 or above 0x230 "); in dspfw_default_callback()
1729 dev_err(tas_priv->dev, "current is 0x%02x\n", drv_ver); in dspfw_default_callback()
1741 int ret = 0; in load_calib_data()
1743 for (i = 0; i < dev_data->nr_blk; i++) { in load_calib_data()
1746 if (ret < 0) in load_calib_data()
1758 static const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 }; in fw_parse_header()
1800 if (offset < 0) in fw_parse_variable_hdr_cal()
1845 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in fw_parse_calibration_data()
1855 /* skip '\0' and 2 unused bytes */ in fw_parse_calibration_data()
1866 if (offset < 0) in fw_parse_calibration_data()
1882 int offset = 0; in tas2781_load_calibration()
1922 if (offset < 0) { in tas2781_load_calibration()
1928 if (offset < 0) { in tas2781_load_calibration()
1934 if (offset < 0) { in tas2781_load_calibration()
1954 int offset = 0; in tasdevice_dspfw_ready()
1955 int ret = 0; in tasdevice_dspfw_ready()
1980 case 0x301: in tasdevice_dspfw_ready()
1981 case 0x302: in tasdevice_dspfw_ready()
1982 case 0x502: in tasdevice_dspfw_ready()
1983 case 0x503: in tasdevice_dspfw_ready()
1993 case 0x202: in tasdevice_dspfw_ready()
1994 case 0x400: in tasdevice_dspfw_ready()
1995 case 0x401: in tasdevice_dspfw_ready()
2014 if (offset < 0) { in tasdevice_dspfw_ready()
2020 if (offset < 0) { in tasdevice_dspfw_ready()
2026 if (offset < 0) in tasdevice_dspfw_ready()
2067 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in tas2781_clear_calfirmware()
2077 for (blks = 0; blks < im->nr_blk; blks++) { in tas2781_clear_calfirmware()
2099 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_calbin_remove()
2118 for (i = 0; i < rca->ncfgs; i++) { in tasdevice_config_info_remove()
2122 for (j = 0; j < (int)ci[i]->real_nblocks; j++) { in tasdevice_config_info_remove()
2141 int ret = 0; in tasdevice_load_data()
2143 for (i = 0; i < dev_data->nr_blk; i++) { in tasdevice_load_data()
2146 if (ret < 0) in tasdevice_load_data()
2182 if (rc < 0) { in tasdev_load_calibrated_data()
2188 if (rc < 0) { in tasdev_load_calibrated_data()
2194 if (rc < 0) { in tasdev_load_calibrated_data()
2200 if (rc < 0) { in tasdev_load_calibrated_data()
2206 if (rc < 0) { in tasdev_load_calibrated_data()
2221 int prog_status = 0; in tasdevice_select_tuningprm_cfg()
2243 if (rca_conf_no >= rca->ncfgs || rca_conf_no < 0 || in tasdevice_select_tuningprm_cfg()
2246 "conf_no:%d should be in range from 0 to %u\n", in tasdevice_select_tuningprm_cfg()
2251 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2253 if (prm_no >= 0 in tasdevice_select_tuningprm_cfg()
2268 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2277 for (i = 0, status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2278 if (cfg_no >= 0 in tasdevice_select_tuningprm_cfg()
2290 status = 0; in tasdevice_select_tuningprm_cfg()
2292 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2322 int prog_status = 0; in tasdevice_prmg_load()
2337 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2338 if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) { in tasdevice_prmg_load()
2348 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2380 if (state == 0) { in tasdevice_tuning_switch()