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
84 1, 2, 1, 2, 1, 1, 0, 2, 4, 3, 1, 2, 3, 4
93 unsigned int config_offset = 0; in tasdevice_add_config()
110 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
142 cfg_info->real_nblocks = 0; in tasdevice_add_config()
143 for (i = 0; i < cfg_info->nblocks; i++) { in tasdevice_add_config()
164 if (bk_da[i]->dev_idx == 0) in tasdevice_add_config()
213 unsigned int total_config_sz = 0; in tasdevice_rca_parser()
215 int offset = 0; in tasdevice_rca_parser()
216 int ret = 0; in tasdevice_rca_parser()
244 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_rca_parser()
245 dev_err(tas_priv->dev, "File version 0x%04x is too low", in tasdevice_rca_parser()
277 for (i = 0; i < TASDEVICE_DEVICE_SUM; i++, offset++) in tasdevice_rca_parser()
283 for (i = 0; i < TASDEVICE_CONFIG_SUM; i++) { in tasdevice_rca_parser()
303 rca->ncfgs = 0; in tasdevice_rca_parser()
304 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_rca_parser()
394 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data_kernel()
397 if (offset < 0) { in fw_parse_data_kernel()
414 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data_kernel()
426 if (offset < 0) in fw_parse_program_data_kernel()
442 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data_kernel()
455 if (offset < 0) in fw_parse_configuration_data_kernel()
481 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
508 if (tas_fmw->nr_programs == 0 || tas_fmw->nr_programs > in fw_parse_variable_header_kernel()
522 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
541 if (tas_fmw->nr_configurations == 0 || in fw_parse_variable_header_kernel()
561 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
580 int blktyp = dev_idx & 0xC0; in tasdevice_process_block()
581 int idx = dev_idx & 0x3F; in tasdevice_process_block()
588 chn = 0; in tasdevice_process_block()
611 for (i = 0; i < len; i++) { in tasdevice_process_block()
617 if (rc < 0) { in tasdevice_process_block()
649 if (rc < 0) { in tasdevice_process_block()
659 unsigned int sleep_time = 0; in tasdevice_process_block()
687 if (rc < 0) { in tasdevice_process_block()
698 if (is_err == true && blktyp != 0) { in tasdevice_process_block()
699 if (blktyp == 0x80) { in tasdevice_process_block()
719 if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { in tasdevice_select_cfg_blk()
726 for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) { in tasdevice_select_cfg_blk()
727 unsigned int length = 0, rc = 0; in tasdevice_select_cfg_blk()
737 for (k = 0; k < (int)blk_data[j]->n_subblks; k++) { in tasdevice_select_cfg_blk()
742 chn = 0; in tasdevice_select_cfg_blk()
776 unsigned char dev_idx = 0; in tasdevice_load_block_kernel()
781 dev_idx = 0x80; in tasdevice_load_block_kernel()
784 dev_idx = 0x81; in tasdevice_load_block_kernel()
790 dev_idx = 0xC1; in tasdevice_load_block_kernel()
793 dev_idx = 0x82; in tasdevice_load_block_kernel()
799 dev_idx = 0xC2; in tasdevice_load_block_kernel()
802 dev_idx = 0x83; in tasdevice_load_block_kernel()
808 dev_idx = 0xC3; in tasdevice_load_block_kernel()
811 dev_idx = 0x84; in tasdevice_load_block_kernel()
817 dev_idx = 0xC4; in tasdevice_load_block_kernel()
821 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
829 dev_idx = 0x80; in tasdevice_load_block_kernel()
832 dev_idx = 0x81; in tasdevice_load_block_kernel()
836 dev_idx = 0xC1; in tasdevice_load_block_kernel()
839 dev_idx = 0x82; in tasdevice_load_block_kernel()
843 dev_idx = 0xC2; in tasdevice_load_block_kernel()
846 dev_idx = 0x83; in tasdevice_load_block_kernel()
850 dev_idx = 0xC3; in tasdevice_load_block_kernel()
853 dev_idx = 0x84; in tasdevice_load_block_kernel()
857 dev_idx = 0xC4; in tasdevice_load_block_kernel()
861 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
868 dev_idx = 0|0x80; in tasdevice_load_block_kernel()
871 dev_idx = 0x81; in tasdevice_load_block_kernel()
875 dev_idx = 0xC1; in tasdevice_load_block_kernel()
878 dev_idx = 0x82; in tasdevice_load_block_kernel()
882 dev_idx = 0xC2; in tasdevice_load_block_kernel()
885 dev_idx = 0x83; in tasdevice_load_block_kernel()
889 dev_idx = 0xC3; in tasdevice_load_block_kernel()
892 dev_idx = 0x84; in tasdevice_load_block_kernel()
896 dev_idx = 0xC4; in tasdevice_load_block_kernel()
900 "%s: load block: Other Type = 0x%02x\n", in tasdevice_load_block_kernel()
906 for (i = 0, length = 0; i < block->nr_subblocks; i++) { in tasdevice_load_block_kernel()
909 if (rc < 0) { in tasdevice_load_block_kernel()
923 return 0; in tasdevice_load_block_kernel()
944 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
972 if (offset < 0) in fw_parse_variable_header_git()
1017 block->is_pchksum_present = 0; in fw_parse_block_data()
1018 block->is_ychksum_present = 0; in fw_parse_block_data()
1081 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data()
1084 if (offset < 0) { in fw_parse_data()
1112 if (tas_fmw->nr_programs == 0) { in fw_parse_program_data()
1126 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data()
1127 int n = 0; in fw_parse_program_data()
1138 /* skip '\0' and 5 unused bytes */ in fw_parse_program_data()
1150 if (offset < 0) in fw_parse_program_data()
1179 if (tas_fmw->nr_configurations == 0) { in fw_parse_configuration_data()
1190 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data()
1212 if (offset < 0) in fw_parse_configuration_data()
1346 unsigned char crc_chksum = 0; in tasdev_multibytes_chksum()
1348 int ret = 0; in tasdev_multibytes_chksum()
1363 ret = 0; in tasdev_multibytes_chksum()
1380 if (ret < 0) in tasdev_multibytes_chksum()
1383 for (i = 0; i < crc_data.len; i++) { in tasdev_multibytes_chksum()
1396 1, 0); in tasdev_multibytes_chksum()
1411 int ret = 0; in do_singlereg_checksum()
1420 ret = 0; in do_singlereg_checksum()
1429 if (ret < 0) in do_singlereg_checksum()
1434 "B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n", in do_singlereg_checksum()
1441 ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0); in do_singlereg_checksum()
1471 if (ret > 0) { in tasdev_bytes_chksum()
1480 if (block->nr_retry > 0) in tasdev_bytes_chksum()
1500 if (ret < 0) in tasdev_multibytes_wr()
1504 book, page, reg, len, 0, crc_chksum); in tasdev_multibytes_wr()
1508 if (ret < 0) in tasdev_multibytes_wr()
1515 if (!block->is_ychksum_present || ret >= 0) { in tasdev_multibytes_wr()
1533 if (ret < 0) { in tasdev_block_chksum()
1539 if ((nr_value & 0xff) != block->pchksum) { in tasdev_block_chksum()
1542 dev_err(tas_priv->dev, "PChkSum = 0x%x, Reg = 0x%x\n", in tasdev_block_chksum()
1543 block->pchksum, (nr_value & 0xff)); in tasdev_block_chksum()
1548 if (block->nr_retry <= 0) in tasdev_block_chksum()
1565 unsigned char crc_chksum = 0; in tasdev_load_blk()
1570 int ret = 0; in tasdev_load_blk()
1572 while (block->nr_retry > 0) { in tasdev_load_blk()
1575 TASDEVICE_I2CChecksum, 0); in tasdev_load_blk()
1576 if (ret < 0) in tasdev_load_blk()
1581 crc_chksum = 0; in tasdev_load_blk()
1583 nr_cmds = 0; in tasdev_load_blk()
1588 book = data[0]; in tasdev_load_blk()
1595 if (offset <= 0x7F) { in tasdev_load_blk()
1599 if (ret < 0) in tasdev_load_blk()
1605 if (ret < 0) in tasdev_load_blk()
1611 if (offset == 0x81) { in tasdev_load_blk()
1612 /*book -- data[0] page -- data[1]*/ in tasdev_load_blk()
1618 if (offset == 0x85) { in tasdev_load_blk()
1621 book = data[0]; in tasdev_load_blk()
1627 if (ret < 0) in tasdev_load_blk()
1632 if (block->nr_retry > 0) in tasdev_load_blk()
1634 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1640 if (block->nr_retry > 0) in tasdev_load_blk()
1642 } else if (ret < 0) /*err in current device, skip it*/ in tasdev_load_blk()
1649 "Blk YChkSum: FW = 0x%x, YCRC = 0x%x\n", in tasdev_load_blk()
1654 ret = 0; in tasdev_load_blk()
1667 int chnend = 0; in tasdevice_load_block()
1668 int ret = 0; in tasdevice_load_block()
1669 int chn = 0; in tasdevice_load_block()
1670 int rc = 0; in tasdevice_load_block()
1674 chn = 0; in tasdevice_load_block()
1680 chn = 0; in tasdevice_load_block()
1702 dev_dbg(tas_priv->dev, "load blk: Other Type = 0x%02x\n", in tasdevice_load_block()
1712 if (ret < 0) in tasdevice_load_block()
1724 int rc = 0; in dspfw_default_callback()
1726 if (drv_ver == 0x100) { in dspfw_default_callback()
1738 case 0x00: in dspfw_default_callback()
1750 "%s: PPCVer must be 0x0 or 0x%02x", in dspfw_default_callback()
1752 dev_err(tas_priv->dev, " Current:0x%02x\n", in dspfw_default_callback()
1760 "DrvVer must be 0x0, 0x230 or above 0x230 "); in dspfw_default_callback()
1761 dev_err(tas_priv->dev, "current is 0x%02x\n", drv_ver); in dspfw_default_callback()
1773 int ret = 0; in load_calib_data()
1775 for (i = 0; i < dev_data->nr_blk; i++) { in load_calib_data()
1778 if (ret < 0) in load_calib_data()
1790 const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 }; in fw_parse_header()
1832 if (offset < 0) in fw_parse_variable_hdr_cal()
1877 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in fw_parse_calibration_data()
1887 /* skip '\0' and 2 unused bytes */ in fw_parse_calibration_data()
1898 if (offset < 0) in fw_parse_calibration_data()
1914 int offset = 0; in tas2781_load_calibration()
1954 if (offset < 0) { in tas2781_load_calibration()
1960 if (offset < 0) { in tas2781_load_calibration()
1966 if (offset < 0) { in tas2781_load_calibration()
1986 int offset = 0; in tasdevice_dspfw_ready()
1987 int ret = 0; in tasdevice_dspfw_ready()
2012 case 0x301: in tasdevice_dspfw_ready()
2013 case 0x302: in tasdevice_dspfw_ready()
2014 case 0x502: in tasdevice_dspfw_ready()
2024 case 0x202: in tasdevice_dspfw_ready()
2025 case 0x400: 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()
2192 int prog_status = 0; in tasdevice_select_tuningprm_cfg()
2214 if (rca_conf_no >= rca->ncfgs || rca_conf_no < 0 || in tasdevice_select_tuningprm_cfg()
2217 "conf_no:%d should be in range from 0 to %u\n", in tasdevice_select_tuningprm_cfg()
2223 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2239 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2260 for (i = 0, status = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2271 status = 0; in tasdevice_select_tuningprm_cfg()
2273 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_select_tuningprm_cfg()
2298 int prog_status = 0; in tasdevice_prmg_load()
2313 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2324 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_load()
2343 int prog_status = 0; in tasdevice_prmg_calibdata_load()
2358 for (i = 0, prog_status = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_calibdata_load()
2370 for (i = 0; i < tas_priv->ndev; i++) { in tasdevice_prmg_calibdata_load()
2408 if (state == 0) { in tasdevice_tuning_switch()