Lines Matching +full:0 +full:x0000001

26 #define ERROR_PRAM_CRCCHK			0x0000000
27 #define ERROR_YRAM_CRCCHK 0x0000001
28 #define PPC_DRIVER_CRCCHK 0x00000200
30 #define TAS2781_SA_COEFF_SWAP_REG TASDEVICE_REG(0, 0x35, 0x2c)
45 #define TAS2781_YRAM_BOOK2 0
56 #define MAIN_ALL_DEVICES_1X 0x01
57 #define MAIN_DEVICE_A_1X 0x02
58 #define MAIN_DEVICE_B_1X 0x03
59 #define MAIN_DEVICE_C_1X 0x04
60 #define MAIN_DEVICE_D_1X 0x05
61 #define COEFF_DEVICE_A_1X 0x12
62 #define COEFF_DEVICE_B_1X 0x13
63 #define COEFF_DEVICE_C_1X 0x14
64 #define COEFF_DEVICE_D_1X 0x15
65 #define PRE_DEVICE_A_1X 0x22
66 #define PRE_DEVICE_B_1X 0x23
67 #define PRE_DEVICE_C_1X 0x24
68 #define PRE_DEVICE_D_1X 0x25
69 #define PRE_SOFTWARE_RESET_DEVICE_A 0x41
70 #define PRE_SOFTWARE_RESET_DEVICE_B 0x42
71 #define PRE_SOFTWARE_RESET_DEVICE_C 0x43
72 #define PRE_SOFTWARE_RESET_DEVICE_D 0x44
73 #define POST_SOFTWARE_RESET_DEVICE_A 0x45
74 #define POST_SOFTWARE_RESET_DEVICE_B 0x46
75 #define POST_SOFTWARE_RESET_DEVICE_C 0x47
76 #define POST_SOFTWARE_RESET_DEVICE_D 0x48
89 1, 2, 1, 2, 1, 1, 0, 2, 4, 3, 1, 2, 3, 4
94 { MAIN_ALL_DEVICES_1X, 0x80 },
95 { MAIN_DEVICE_A_1X, 0x81 },
96 { COEFF_DEVICE_A_1X, 0xC1 },
97 { PRE_DEVICE_A_1X, 0xC1 },
98 { PRE_SOFTWARE_RESET_DEVICE_A, 0xC1 },
99 { POST_SOFTWARE_RESET_DEVICE_A, 0xC1 },
100 { MAIN_DEVICE_B_1X, 0x82 },
101 { COEFF_DEVICE_B_1X, 0xC2 },
102 { PRE_DEVICE_B_1X, 0xC2 },
103 { PRE_SOFTWARE_RESET_DEVICE_B, 0xC2 },
104 { POST_SOFTWARE_RESET_DEVICE_B, 0xC2 },
105 { MAIN_DEVICE_C_1X, 0x83 },
106 { COEFF_DEVICE_C_1X, 0xC3 },
107 { PRE_DEVICE_C_1X, 0xC3 },
108 { PRE_SOFTWARE_RESET_DEVICE_C, 0xC3 },
109 { POST_SOFTWARE_RESET_DEVICE_C, 0xC3 },
110 { MAIN_DEVICE_D_1X, 0x84 },
111 { COEFF_DEVICE_D_1X, 0xC4 },
112 { PRE_DEVICE_D_1X, 0xC4 },
113 { PRE_SOFTWARE_RESET_DEVICE_D, 0xC4 },
114 { POST_SOFTWARE_RESET_DEVICE_D, 0xC4 },
118 { MAIN_ALL_DEVICES_1X, 0x80 },
119 { MAIN_DEVICE_A_1X, 0x81 },
120 { COEFF_DEVICE_A_1X, 0xC1 },
121 { PRE_DEVICE_A_1X, 0xC1 },
122 { MAIN_DEVICE_B_1X, 0x82 },
123 { COEFF_DEVICE_B_1X, 0xC2 },
124 { PRE_DEVICE_B_1X, 0xC2 },
125 { MAIN_DEVICE_C_1X, 0x83 },
126 { COEFF_DEVICE_C_1X, 0xC3 },
127 { PRE_DEVICE_C_1X, 0xC3 },
128 { MAIN_DEVICE_D_1X, 0x84 },
129 { COEFF_DEVICE_D_1X, 0xC4 },
130 { PRE_DEVICE_D_1X, 0xC4 },
134 { MAIN_ALL_DEVICES, 0x80 },
135 { MAIN_DEVICE_A, 0x81 },
136 { COEFF_DEVICE_A, 0xC1 },
137 { PRE_DEVICE_A, 0xC1 },
138 { MAIN_DEVICE_B, 0x82 },
139 { COEFF_DEVICE_B, 0xC2 },
140 { PRE_DEVICE_B, 0xC2 },
141 { MAIN_DEVICE_C, 0x83 },
142 { COEFF_DEVICE_C, 0xC3 },
143 { PRE_DEVICE_C, 0xC3 },
144 { MAIN_DEVICE_D, 0x84 },
145 { COEFF_DEVICE_D, 0xC4 },
146 { PRE_DEVICE_D, 0xC4 },
155 unsigned int config_offset = 0; in tasdevice_add_config()
172 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
204 cfg_info->real_nblocks = 0; in tasdevice_add_config()
205 for (i = 0; i < cfg_info->nblocks; i++) { in tasdevice_add_config()
226 if (bk_da[i]->dev_idx == 0) in tasdevice_add_config()
275 unsigned int total_config_sz = 0; in tasdevice_rca_parser()
277 int offset = 0; in tasdevice_rca_parser()
278 int ret = 0; in tasdevice_rca_parser()
306 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_rca_parser()
307 dev_err(tas_priv->dev, "File version 0x%04x is too low", in tasdevice_rca_parser()
339 for (i = 0; i < TASDEVICE_DEVICE_SUM; i++, offset++) in tasdevice_rca_parser()
345 for (i = 0; i < TASDEVICE_CONFIG_SUM; i++) { in tasdevice_rca_parser()
365 rca->ncfgs = 0; in tasdevice_rca_parser()
366 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_rca_parser()
392 unsigned char dev_idx = 0; in map_dev_idx()
402 for (i = 0; i < n; i++) { in map_dev_idx()
495 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data_kernel()
498 if (offset < 0) { in fw_parse_data_kernel()
515 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data_kernel()
527 if (offset < 0) in fw_parse_program_data_kernel()
543 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data_kernel()
556 if (offset < 0) in fw_parse_configuration_data_kernel()
582 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
609 if (tas_fmw->nr_programs == 0 || tas_fmw->nr_programs > in fw_parse_variable_header_kernel()
623 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
642 if (tas_fmw->nr_configurations == 0 || in fw_parse_variable_header_kernel()
662 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
681 int blktyp = dev_idx & 0xC0; in tasdevice_process_block()
682 int idx = dev_idx & 0x3F; in tasdevice_process_block()
689 chn = 0; in tasdevice_process_block()
712 for (i = 0; i < len; i++) { in tasdevice_process_block()
718 if (rc < 0) { in tasdevice_process_block()
750 if (rc < 0) { in tasdevice_process_block()
760 unsigned int sleep_time = 0; in tasdevice_process_block()
788 if (rc < 0) { in tasdevice_process_block()
799 if (is_err == true && blktyp != 0) { in tasdevice_process_block()
800 if (blktyp == 0x80) { in tasdevice_process_block()
820 if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { in tasdevice_select_cfg_blk()
827 for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) { in tasdevice_select_cfg_blk()
828 unsigned int length = 0, rc = 0; in tasdevice_select_cfg_blk()
838 for (k = 0; k < (int)blk_data[j]->n_subblks; k++) { in tasdevice_select_cfg_blk()
843 chn = 0; in tasdevice_select_cfg_blk()
876 for (i = 0, length = 0; i < block->nr_subblocks; i++) { in tasdevice_load_block_kernel()
879 if (rc < 0) { in tasdevice_load_block_kernel()
893 return 0; in tasdevice_load_block_kernel()
914 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
942 if (offset < 0) in fw_parse_variable_header_git()
987 block->is_pchksum_present = 0; in fw_parse_block_data()
988 block->is_ychksum_present = 0; in fw_parse_block_data()
1051 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data()
1054 if (offset < 0) { in fw_parse_data()
1082 if (tas_fmw->nr_programs == 0) { in fw_parse_program_data()
1096 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data()
1097 int n = 0; in fw_parse_program_data()
1108 /* skip '\0' and 5 unused bytes */ in fw_parse_program_data()
1120 if (offset < 0) in fw_parse_program_data()
1149 if (tas_fmw->nr_configurations == 0) { in fw_parse_configuration_data()
1160 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data()
1182 if (offset < 0) in fw_parse_configuration_data()
1316 unsigned char crc_chksum = 0; in tasdev_multibytes_chksum()
1318 int ret = 0; in tasdev_multibytes_chksum()
1333 ret = 0; in tasdev_multibytes_chksum()
1350 if (ret < 0) in tasdev_multibytes_chksum()
1353 for (i = 0; i < crc_data.len; i++) { in tasdev_multibytes_chksum()
1366 1, 0); in tasdev_multibytes_chksum()
1381 int ret = 0; in do_singlereg_checksum()
1390 ret = 0; in do_singlereg_checksum()
1399 if (ret < 0) in do_singlereg_checksum()
1404 "B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n", in do_singlereg_checksum()
1411 ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0); in do_singlereg_checksum()
1441 if (ret > 0) { in tasdev_bytes_chksum()
1450 if (block->nr_retry > 0) in tasdev_bytes_chksum()
1470 if (ret < 0) in tasdev_multibytes_wr()
1474 book, page, reg, len, 0, crc_chksum); in tasdev_multibytes_wr()
1478 if (ret < 0) in tasdev_multibytes_wr()
1485 if (!block->is_ychksum_present || ret >= 0) { in tasdev_multibytes_wr()
1503 if (ret < 0) { in tasdev_block_chksum()
1509 if ((nr_value & 0xff) != block->pchksum) { in tasdev_block_chksum()
1512 dev_err(tas_priv->dev, "PChkSum = 0x%x, Reg = 0x%x\n", in tasdev_block_chksum()
1513 block->pchksum, (nr_value & 0xff)); in tasdev_block_chksum()
1518 if (block->nr_retry <= 0) in tasdev_block_chksum()
1535 unsigned char crc_chksum = 0; in tasdev_load_blk()
1540 int ret = 0; in tasdev_load_blk()
1542 while (block->nr_retry > 0) { in tasdev_load_blk()
1545 TASDEVICE_I2CChecksum, 0); in tasdev_load_blk()
1546 if (ret < 0) in tasdev_load_blk()
1551 crc_chksum = 0; in tasdev_load_blk()
1553 nr_cmds = 0; in tasdev_load_blk()
1558 book = data[0]; in tasdev_load_blk()
1565 if (offset <= 0x7F) { in tasdev_load_blk()
1569 if (ret < 0) in tasdev_load_blk()
1575 if (ret < 0) in tasdev_load_blk()
1581 if (offset == 0x81) { in tasdev_load_blk()
1582 /*book -- data[0] page -- data[1]*/ in tasdev_load_blk()
1588 if (offset == 0x85) { in tasdev_load_blk()
1591 book = data[0]; in tasdev_load_blk()
1597 if (ret < 0) in tasdev_load_blk()
1602 if (block->nr_retry > 0) in tasdev_load_blk()
1604 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1610 if (block->nr_retry > 0) in tasdev_load_blk()
1612 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1619 "Blk YChkSum: FW = 0x%x, YCRC = 0x%x\n", in tasdev_load_blk()
1624 ret = 0; in tasdev_load_blk()
1637 int chnend = 0; in tasdevice_load_block()
1638 int ret = 0; in tasdevice_load_block()
1639 int chn = 0; in tasdevice_load_block()
1640 int rc = 0; in tasdevice_load_block()
1644 chn = 0; in tasdevice_load_block()
1650 chn = 0; in tasdevice_load_block()
1672 dev_dbg(tas_priv->dev, "load blk: Other Type = 0x%02x\n", in tasdevice_load_block()
1682 if (ret < 0) in tasdevice_load_block()
1694 int rc = 0; in dspfw_default_callback()
1696 if (drv_ver == 0x100) { in dspfw_default_callback()
1708 case 0x00: in dspfw_default_callback()
1720 "%s: PPCVer must be 0x0 or 0x%02x", in dspfw_default_callback()
1722 dev_err(tas_priv->dev, " Current:0x%02x\n", in dspfw_default_callback()
1730 "DrvVer must be 0x0, 0x230 or above 0x230 "); in dspfw_default_callback()
1731 dev_err(tas_priv->dev, "current is 0x%02x\n", drv_ver); in dspfw_default_callback()
1743 int ret = 0; in load_calib_data()
1745 for (i = 0; i < dev_data->nr_blk; i++) { in load_calib_data()
1748 if (ret < 0) in load_calib_data()
1760 static const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 }; in fw_parse_header()
1802 if (offset < 0) in fw_parse_variable_hdr_cal()
1847 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in fw_parse_calibration_data()
1857 /* skip '\0' and 2 unused bytes */ in fw_parse_calibration_data()
1868 if (offset < 0) in fw_parse_calibration_data()
1884 int offset = 0; in tas2781_load_calibration()
1924 if (offset < 0) { in tas2781_load_calibration()
1930 if (offset < 0) { in tas2781_load_calibration()
1936 if (offset < 0) { in tas2781_load_calibration()
1956 int offset = 0; in tasdevice_dspfw_ready()
1957 int ret = 0; in tasdevice_dspfw_ready()
1982 case 0x301: in tasdevice_dspfw_ready()
1983 case 0x302: in tasdevice_dspfw_ready()
1984 case 0x502: in tasdevice_dspfw_ready()
1985 case 0x503: in tasdevice_dspfw_ready()
1995 case 0x202: in tasdevice_dspfw_ready()
1996 case 0x400: in tasdevice_dspfw_ready()
2015 if (offset < 0) { in tasdevice_dspfw_ready()
2021 if (offset < 0) { in tasdevice_dspfw_ready()
2027 if (offset < 0) in tasdevice_dspfw_ready()
2068 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in tas2781_clear_calfirmware()
2078 for (blks = 0; blks < im->nr_blk; blks++) { in tas2781_clear_calfirmware()
2100 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_calbin_remove()
2119 for (i = 0; i < rca->ncfgs; i++) { in tasdevice_config_info_remove()
2123 for (j = 0; j < (int)ci[i]->real_nblocks; j++) { in tasdevice_config_info_remove()
2142 int ret = 0; in tasdevice_load_data()
2144 for (i = 0; i < dev_data->nr_blk; i++) { in tasdevice_load_data()
2147 if (ret < 0) in tasdevice_load_data()
2163 int prog_status = 0; in tasdevice_select_tuningprm_cfg()
2185 if (rca_conf_no >= rca->ncfgs || rca_conf_no < 0 || in tasdevice_select_tuningprm_cfg()
2188 "conf_no:%d should be in range from 0 to %u\n", in tasdevice_select_tuningprm_cfg()
2193 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2195 if (prm_no >= 0 in tasdevice_select_tuningprm_cfg()
2210 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2231 for (i = 0, status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2232 if (cfg_no >= 0 in tasdevice_select_tuningprm_cfg()
2244 status = 0; in tasdevice_select_tuningprm_cfg()
2246 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2271 int prog_status = 0; in tasdevice_prmg_load()
2286 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2287 if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) { in tasdevice_prmg_load()
2297 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2316 int prog_status = 0; in tasdevice_prmg_calibdata_load()
2331 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_calibdata_load()
2332 if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) { in tasdevice_prmg_calibdata_load()
2343 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_calibdata_load()
2381 if (state == 0) { in tasdevice_tuning_switch()