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
83 1, 2, 1, 2, 1, 1, 0, 2, 4, 3, 1, 2, 3, 4
92 unsigned int config_offset = 0; in tasdevice_add_config()
109 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
140 cfg_info->real_nblocks = 0; in tasdevice_add_config()
141 for (i = 0; i < cfg_info->nblocks; i++) { in tasdevice_add_config()
162 if (bk_da[i]->dev_idx == 0) in tasdevice_add_config()
211 unsigned int total_config_sz = 0; in tasdevice_rca_parser()
213 int offset = 0; in tasdevice_rca_parser()
214 int ret = 0; in tasdevice_rca_parser()
242 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_rca_parser()
243 dev_err(tas_priv->dev, "File version 0x%04x is too low", in tasdevice_rca_parser()
275 for (i = 0; i < TASDEVICE_DEVICE_SUM; i++, offset++) in tasdevice_rca_parser()
281 for (i = 0; i < TASDEVICE_CONFIG_SUM; i++) { in tasdevice_rca_parser()
301 rca->ncfgs = 0; in tasdevice_rca_parser()
302 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_rca_parser()
392 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data_kernel()
395 if (offset < 0) { in fw_parse_data_kernel()
412 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data_kernel()
424 if (offset < 0) in fw_parse_program_data_kernel()
440 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data_kernel()
453 if (offset < 0) in fw_parse_configuration_data_kernel()
479 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
506 if (tas_fmw->nr_programs == 0 || tas_fmw->nr_programs > in fw_parse_variable_header_kernel()
520 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
539 if (tas_fmw->nr_configurations == 0 || in fw_parse_variable_header_kernel()
559 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
578 int blktyp = dev_idx & 0xC0; in tasdevice_process_block()
579 int idx = dev_idx & 0x3F; in tasdevice_process_block()
586 chn = 0; in tasdevice_process_block()
609 for (i = 0; i < len; i++) { in tasdevice_process_block()
615 if (rc < 0) { in tasdevice_process_block()
647 if (rc < 0) { in tasdevice_process_block()
657 unsigned int sleep_time = 0; in tasdevice_process_block()
685 if (rc < 0) { in tasdevice_process_block()
696 if (is_err == true && blktyp != 0) { in tasdevice_process_block()
697 if (blktyp == 0x80) { in tasdevice_process_block()
717 if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { in tasdevice_select_cfg_blk()
724 for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) { in tasdevice_select_cfg_blk()
725 unsigned int length = 0, rc = 0; in tasdevice_select_cfg_blk()
735 for (k = 0; k < (int)blk_data[j]->n_subblks; k++) { in tasdevice_select_cfg_blk()
740 chn = 0; in tasdevice_select_cfg_blk()
774 unsigned char dev_idx = 0; in tasdevice_load_block_kernel()
779 dev_idx = 0x80; in tasdevice_load_block_kernel()
782 dev_idx = 0x81; in tasdevice_load_block_kernel()
788 dev_idx = 0xC1; in tasdevice_load_block_kernel()
791 dev_idx = 0x82; in tasdevice_load_block_kernel()
797 dev_idx = 0xC2; in tasdevice_load_block_kernel()
800 dev_idx = 0x83; in tasdevice_load_block_kernel()
806 dev_idx = 0xC3; in tasdevice_load_block_kernel()
809 dev_idx = 0x84; in tasdevice_load_block_kernel()
815 dev_idx = 0xC4; in tasdevice_load_block_kernel()
819 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
827 dev_idx = 0x80; in tasdevice_load_block_kernel()
830 dev_idx = 0x81; in tasdevice_load_block_kernel()
834 dev_idx = 0xC1; in tasdevice_load_block_kernel()
837 dev_idx = 0x82; in tasdevice_load_block_kernel()
841 dev_idx = 0xC2; in tasdevice_load_block_kernel()
844 dev_idx = 0x83; in tasdevice_load_block_kernel()
848 dev_idx = 0xC3; in tasdevice_load_block_kernel()
851 dev_idx = 0x84; in tasdevice_load_block_kernel()
855 dev_idx = 0xC4; in tasdevice_load_block_kernel()
859 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
866 dev_idx = 0|0x80; in tasdevice_load_block_kernel()
869 dev_idx = 0x81; in tasdevice_load_block_kernel()
873 dev_idx = 0xC1; in tasdevice_load_block_kernel()
876 dev_idx = 0x82; in tasdevice_load_block_kernel()
880 dev_idx = 0xC2; in tasdevice_load_block_kernel()
883 dev_idx = 0x83; in tasdevice_load_block_kernel()
887 dev_idx = 0xC3; in tasdevice_load_block_kernel()
890 dev_idx = 0x84; in tasdevice_load_block_kernel()
894 dev_idx = 0xC4; in tasdevice_load_block_kernel()
898 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
904 for (i = 0, length = 0; i < block->nr_subblocks; i++) { in tasdevice_load_block_kernel()
907 if (rc < 0) { in tasdevice_load_block_kernel()
921 return 0; in tasdevice_load_block_kernel()
942 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
970 if (offset < 0) in fw_parse_variable_header_git()
1015 block->is_pchksum_present = 0; in fw_parse_block_data()
1016 block->is_ychksum_present = 0; in fw_parse_block_data()
1079 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data()
1082 if (offset < 0) { in fw_parse_data()
1110 if (tas_fmw->nr_programs == 0) { in fw_parse_program_data()
1124 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data()
1125 int n = 0; in fw_parse_program_data()
1136 /* skip '\0' and 5 unused bytes */ in fw_parse_program_data()
1148 if (offset < 0) in fw_parse_program_data()
1177 if (tas_fmw->nr_configurations == 0) { in fw_parse_configuration_data()
1188 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data()
1210 if (offset < 0) in fw_parse_configuration_data()
1344 unsigned char crc_chksum = 0; in tasdev_multibytes_chksum()
1346 int ret = 0; in tasdev_multibytes_chksum()
1361 ret = 0; in tasdev_multibytes_chksum()
1378 if (ret < 0) in tasdev_multibytes_chksum()
1381 for (i = 0; i < crc_data.len; i++) { in tasdev_multibytes_chksum()
1394 1, 0); in tasdev_multibytes_chksum()
1409 int ret = 0; in do_singlereg_checksum()
1418 ret = 0; in do_singlereg_checksum()
1427 if (ret < 0) in do_singlereg_checksum()
1432 "B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n", in do_singlereg_checksum()
1439 ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0); in do_singlereg_checksum()
1469 if (ret > 0) { in tasdev_bytes_chksum()
1478 if (block->nr_retry > 0) in tasdev_bytes_chksum()
1498 if (ret < 0) in tasdev_multibytes_wr()
1502 book, page, reg, len, 0, crc_chksum); in tasdev_multibytes_wr()
1506 if (ret < 0) in tasdev_multibytes_wr()
1513 if (!block->is_ychksum_present || ret >= 0) { in tasdev_multibytes_wr()
1531 if (ret < 0) { in tasdev_block_chksum()
1537 if ((nr_value & 0xff) != block->pchksum) { in tasdev_block_chksum()
1540 dev_err(tas_priv->dev, "PChkSum = 0x%x, Reg = 0x%x\n", in tasdev_block_chksum()
1541 block->pchksum, (nr_value & 0xff)); in tasdev_block_chksum()
1546 if (block->nr_retry <= 0) in tasdev_block_chksum()
1563 unsigned char crc_chksum = 0; in tasdev_load_blk()
1568 int ret = 0; in tasdev_load_blk()
1570 while (block->nr_retry > 0) { in tasdev_load_blk()
1573 TASDEVICE_I2CChecksum, 0); in tasdev_load_blk()
1574 if (ret < 0) in tasdev_load_blk()
1579 crc_chksum = 0; in tasdev_load_blk()
1581 nr_cmds = 0; in tasdev_load_blk()
1586 book = data[0]; in tasdev_load_blk()
1593 if (offset <= 0x7F) { in tasdev_load_blk()
1597 if (ret < 0) in tasdev_load_blk()
1603 if (ret < 0) in tasdev_load_blk()
1609 if (offset == 0x81) { in tasdev_load_blk()
1610 /*book -- data[0] page -- data[1]*/ in tasdev_load_blk()
1616 if (offset == 0x85) { in tasdev_load_blk()
1619 book = data[0]; in tasdev_load_blk()
1625 if (ret < 0) in tasdev_load_blk()
1630 if (block->nr_retry > 0) in tasdev_load_blk()
1632 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1638 if (block->nr_retry > 0) in tasdev_load_blk()
1640 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1647 "Blk YChkSum: FW = 0x%x, YCRC = 0x%x\n", in tasdev_load_blk()
1652 ret = 0; in tasdev_load_blk()
1665 int chnend = 0; in tasdevice_load_block()
1666 int ret = 0; in tasdevice_load_block()
1667 int chn = 0; in tasdevice_load_block()
1668 int rc = 0; in tasdevice_load_block()
1672 chn = 0; in tasdevice_load_block()
1678 chn = 0; in tasdevice_load_block()
1700 dev_dbg(tas_priv->dev, "load blk: Other Type = 0x%02x\n", in tasdevice_load_block()
1710 if (ret < 0) in tasdevice_load_block()
1722 int rc = 0; in dspfw_default_callback()
1724 if (drv_ver == 0x100) { in dspfw_default_callback()
1736 case 0x00: in dspfw_default_callback()
1748 "%s: PPCVer must be 0x0 or 0x%02x", in dspfw_default_callback()
1750 dev_err(tas_priv->dev, " Current:0x%02x\n", in dspfw_default_callback()
1758 "DrvVer must be 0x0, 0x230 or above 0x230 "); in dspfw_default_callback()
1759 dev_err(tas_priv->dev, "current is 0x%02x\n", drv_ver); in dspfw_default_callback()
1771 int ret = 0; in load_calib_data()
1773 for (i = 0; i < dev_data->nr_blk; i++) { in load_calib_data()
1776 if (ret < 0) in load_calib_data()
1788 const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 }; in fw_parse_header()
1830 if (offset < 0) in fw_parse_variable_hdr_cal()
1875 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in fw_parse_calibration_data()
1885 /* skip '\0' and 2 unused bytes */ in fw_parse_calibration_data()
1896 if (offset < 0) in fw_parse_calibration_data()
1912 int offset = 0; in tas2781_load_calibration()
1952 if (offset < 0) { in tas2781_load_calibration()
1958 if (offset < 0) { in tas2781_load_calibration()
1964 if (offset < 0) { in tas2781_load_calibration()
1984 int offset = 0; in tasdevice_dspfw_ready()
1985 int ret = 0; in tasdevice_dspfw_ready()
2010 case 0x301: in tasdevice_dspfw_ready()
2011 case 0x302: in tasdevice_dspfw_ready()
2012 case 0x502: in tasdevice_dspfw_ready()
2013 case 0x503: in tasdevice_dspfw_ready()
2023 case 0x202: in tasdevice_dspfw_ready()
2024 case 0x400: in tasdevice_dspfw_ready()
2025 case 0x401: in tasdevice_dspfw_ready()
2044 if (offset < 0) { in tasdevice_dspfw_ready()
2050 if (offset < 0) { in tasdevice_dspfw_ready()
2056 if (offset < 0) in tasdevice_dspfw_ready()
2097 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in tas2781_clear_calfirmware()
2107 for (blks = 0; blks < im->nr_blk; blks++) { in tas2781_clear_calfirmware()
2129 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_calbin_remove()
2148 for (i = 0; i < rca->ncfgs; i++) { in tasdevice_config_info_remove()
2152 for (j = 0; j < (int)ci[i]->real_nblocks; j++) { in tasdevice_config_info_remove()
2171 int ret = 0; in tasdevice_load_data()
2173 for (i = 0; i < dev_data->nr_blk; i++) { in tasdevice_load_data()
2176 if (ret < 0) in tasdevice_load_data()
2210 int prog_status = 0; in tasdevice_select_tuningprm_cfg()
2232 if (rca_conf_no >= rca->ncfgs || rca_conf_no < 0 || in tasdevice_select_tuningprm_cfg()
2235 "conf_no:%d should be in range from 0 to %u\n", in tasdevice_select_tuningprm_cfg()
2240 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2242 if (prm_no >= 0 in tasdevice_select_tuningprm_cfg()
2257 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2266 for (i = 0, status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2267 if (cfg_no >= 0 in tasdevice_select_tuningprm_cfg()
2279 status = 0; in tasdevice_select_tuningprm_cfg()
2281 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2310 int prog_status = 0; in tasdevice_prmg_load()
2325 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2326 if (prm_no >= 0 && tas_priv->tasdevice[i].cur_prog != prm_no) { in tasdevice_prmg_load()
2336 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2368 if (state == 0) { in tasdevice_tuning_switch()