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
90 { MAIN_ALL_DEVICES_1X, 0x80 },
91 { MAIN_DEVICE_A_1X, 0x81 },
92 { COEFF_DEVICE_A_1X, 0x81 },
93 { PRE_DEVICE_A_1X, 0x81 },
94 { PRE_SOFTWARE_RESET_DEVICE_A, 0xC1 },
95 { POST_SOFTWARE_RESET_DEVICE_A, 0xC1 },
96 { MAIN_DEVICE_B_1X, 0x82 },
97 { COEFF_DEVICE_B_1X, 0x82 },
98 { PRE_DEVICE_B_1X, 0x82 },
99 { PRE_SOFTWARE_RESET_DEVICE_B, 0xC2 },
100 { POST_SOFTWARE_RESET_DEVICE_B, 0xC2 },
101 { MAIN_DEVICE_C_1X, 0x83 },
102 { COEFF_DEVICE_C_1X, 0x83 },
103 { PRE_DEVICE_C_1X, 0x83 },
104 { PRE_SOFTWARE_RESET_DEVICE_C, 0xC3 },
105 { POST_SOFTWARE_RESET_DEVICE_C, 0xC3 },
106 { MAIN_DEVICE_D_1X, 0x84 },
107 { COEFF_DEVICE_D_1X, 0x84 },
108 { PRE_DEVICE_D_1X, 0x84 },
109 { PRE_SOFTWARE_RESET_DEVICE_D, 0xC4 },
110 { POST_SOFTWARE_RESET_DEVICE_D, 0xC4 },
114 { MAIN_ALL_DEVICES_1X, 0x80 },
115 { MAIN_DEVICE_A_1X, 0x81 },
116 { COEFF_DEVICE_A_1X, 0xC1 },
117 { PRE_DEVICE_A_1X, 0xC1 },
118 { MAIN_DEVICE_B_1X, 0x82 },
119 { COEFF_DEVICE_B_1X, 0xC2 },
120 { PRE_DEVICE_B_1X, 0xC2 },
121 { MAIN_DEVICE_C_1X, 0x83 },
122 { COEFF_DEVICE_C_1X, 0xC3 },
123 { PRE_DEVICE_C_1X, 0xC3 },
124 { MAIN_DEVICE_D_1X, 0x84 },
125 { COEFF_DEVICE_D_1X, 0xC4 },
126 { PRE_DEVICE_D_1X, 0xC4 },
130 { MAIN_ALL_DEVICES, 0x80 },
131 { MAIN_DEVICE_A, 0x81 },
132 { COEFF_DEVICE_A, 0xC1 },
133 { PRE_DEVICE_A, 0xC1 },
134 { MAIN_DEVICE_B, 0x82 },
135 { COEFF_DEVICE_B, 0xC2 },
136 { PRE_DEVICE_B, 0xC2 },
137 { MAIN_DEVICE_C, 0x83 },
138 { COEFF_DEVICE_C, 0xC3 },
139 { PRE_DEVICE_C, 0xC3 },
140 { MAIN_DEVICE_D, 0x84 },
141 { COEFF_DEVICE_D, 0xC4 },
142 { PRE_DEVICE_D, 0xC4 },
156 unsigned int config_offset = 0; in tasdevice_add_config()
174 if (tas_priv->rcabin.fw_hdr.binary_version_num >= 0x105) { in tasdevice_add_config()
207 cfg_info->real_nblocks = 0; in tasdevice_add_config()
208 for (i = 0; i < cfg_info->nblocks; i++) { in tasdevice_add_config()
262 for (int j = 0; j < i; j++) in tasdevice_add_config()
277 unsigned int total_config_sz = 0; in tasdevice_spi_rca_parser()
278 int offset = 0, ret = 0, i; in tasdevice_spi_rca_parser()
303 if (fw_hdr->binary_version_num < 0x103) { in tasdevice_spi_rca_parser()
304 dev_err(tas_priv->dev, "File version 0x%04x is too low", in tasdevice_spi_rca_parser()
322 for (i = 0; i < TASDEVICE_DEVICE_SUM; i++, offset++) in tasdevice_spi_rca_parser()
328 for (i = 0; i < TASDEVICE_CONFIG_SUM; i++) { in tasdevice_spi_rca_parser()
347 rca->ncfgs = 0; in tasdevice_spi_rca_parser()
348 for (i = 0; i < (int)fw_hdr->nconfig; i++) { in tasdevice_spi_rca_parser()
371 unsigned char dev_idx = 0; in map_dev_idx()
381 for (i = 0; i < n; i++) { in map_dev_idx()
462 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data_kernel()
466 if (offset < 0) { in fw_parse_data_kernel()
483 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data_kernel()
494 if (offset < 0) in fw_parse_program_data_kernel()
509 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data_kernel()
521 if (offset < 0) in fw_parse_configuration_data_kernel()
545 if (fw_hdr->device_family != 0) { in fw_parse_variable_header_kernel()
561 if (tas_fmw->nr_programs == 0 || in fw_parse_variable_header_kernel()
572 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
590 if (tas_fmw->nr_configurations == 0 || in fw_parse_variable_header_kernel()
610 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_variable_header_kernel()
640 return 0; in tasdevice_single_byte_wr()
643 for (i = 0; i < len; i++) { in tasdevice_single_byte_wr()
644 if (dev_idx == (tas_priv->index + 1) || dev_idx == 0) { in tasdevice_single_byte_wr()
650 if (rc < 0) { in tasdevice_single_byte_wr()
688 if (dev_idx == (tas_priv->index + 1) || dev_idx == 0) { in tasdevice_burst_wr()
694 if (rc < 0) { in tasdevice_burst_wr()
717 if (dev_idx == (tas_priv->index + 1) || dev_idx == 0) { in tasdevice_delay()
745 if (dev_idx == (tas_priv->index + 1) || dev_idx == 0) { in tasdevice_field_wr()
752 if (rc < 0) { in tasdevice_field_wr()
768 int blktyp = dev_idx & 0xC0, subblk_offset; in tasdevice_process_block()
774 dev_idx & 0x3f, data, sublocksize); in tasdevice_process_block()
778 dev_idx & 0x3f, data, sublocksize); in tasdevice_process_block()
782 dev_idx & 0x3f, data, sublocksize); in tasdevice_process_block()
786 dev_idx & 0x3f, data, sublocksize); in tasdevice_process_block()
792 if (((subblk_offset & OFFSET_ERROR_BIT) != 0) && blktyp != 0) { in tasdevice_process_block()
793 if (blktyp == 0x80) { in tasdevice_process_block()
817 if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { in tasdevice_spi_select_cfg_blk()
824 for (j = 0; j < cfg_info[conf_no]->real_nblocks; j++) { in tasdevice_spi_select_cfg_blk()
825 unsigned int length = 0, rc = 0; in tasdevice_spi_select_cfg_blk()
835 for (k = 0; k < blk_data[j]->n_subblks; k++) { in tasdevice_spi_select_cfg_blk()
865 for (i = 0, length = 0; i < block->nr_subblocks; i++) { in tasdevice_load_block_kernel()
868 if (rc < 0) { in tasdevice_load_block_kernel()
883 return 0; in tasdevice_load_block_kernel()
904 if (fw_hdr->device_family != 0) { in fw_parse_variable_hdr()
965 block->is_pchksum_present = 0; in fw_parse_block_data()
966 block->is_ychksum_present = 0; in fw_parse_block_data()
1023 for (i = 0; i < img_data->nr_blk; i++) { in fw_parse_data()
1026 if (offset < 0) in fw_parse_data()
1051 if (tas_fmw->nr_programs == 0) { in fw_parse_program_data()
1064 for (i = 0; i < tas_fmw->nr_programs; i++) { in fw_parse_program_data()
1065 int n = 0; in fw_parse_program_data()
1075 /* skip '\0' and 5 unused bytes */ in fw_parse_program_data()
1086 if (offset < 0) in fw_parse_program_data()
1111 if (tas_fmw->nr_configurations == 0) { in fw_parse_configuration_data()
1120 for (i = 0; i < tas_fmw->nr_configurations; i++) { in fw_parse_configuration_data()
1138 if (offset < 0) in fw_parse_configuration_data()
1273 unsigned char crc_chksum = 0; in tasdev_multibytes_chksum()
1275 int ret = 0, i; in tasdev_multibytes_chksum()
1289 ret = 0; in tasdev_multibytes_chksum()
1306 if (ret < 0) in tasdev_multibytes_chksum()
1309 for (i = 0; i < crc_data.len; i++) { in tasdev_multibytes_chksum()
1320 1, 0); in tasdev_multibytes_chksum()
1336 int ret = 0; in do_singlereg_checksum()
1344 return 0; in do_singlereg_checksum()
1348 return 0; in do_singlereg_checksum()
1351 if (ret < 0) in do_singlereg_checksum()
1356 "B[0x%x]P[0x%x]R[0x%x] W[0x%x], R[0x%x]\n", in do_singlereg_checksum()
1362 ret = crc8(tasdevice->crc8_lkp_tbl, &val, 1, 0); in do_singlereg_checksum()
1392 if (ret > 0) { in tasdev_bytes_chksum()
1401 if (block->nr_retry > 0) in tasdev_bytes_chksum()
1422 if (ret < 0) in tasdev_multibytes_wr()
1426 book, page, reg, len, 0, crc_chksum); in tasdev_multibytes_wr()
1430 if (ret < 0) in tasdev_multibytes_wr()
1437 if (!block->is_ychksum_present || ret >= 0) { in tasdev_multibytes_wr()
1454 if (ret < 0) { in tasdev_block_chksum()
1460 if ((nr_value & 0xff) != block->pchksum) { in tasdev_block_chksum()
1462 dev_err(tas_priv->dev, "PChkSum = 0x%x, Reg = 0x%x\n", in tasdev_block_chksum()
1463 block->pchksum, (nr_value & 0xff)); in tasdev_block_chksum()
1468 if (block->nr_retry <= 0) in tasdev_block_chksum()
1484 unsigned char crc_chksum = 0; in tasdev_load_blk()
1485 int ret = 0; in tasdev_load_blk()
1487 while (block->nr_retry > 0) { in tasdev_load_blk()
1490 TASDEVICE_CHECKSUM, 0); in tasdev_load_blk()
1491 if (ret < 0) in tasdev_load_blk()
1496 crc_chksum = 0; in tasdev_load_blk()
1498 nr_cmds = 0; in tasdev_load_blk()
1503 book = data[0]; in tasdev_load_blk()
1510 if (offset <= 0x7F) { in tasdev_load_blk()
1514 if (ret < 0) in tasdev_load_blk()
1520 if (ret < 0) in tasdev_load_blk()
1526 if (offset == 0x81) { in tasdev_load_blk()
1527 /* book -- data[0] page -- data[1] */ in tasdev_load_blk()
1533 if (offset == 0x85) { in tasdev_load_blk()
1536 book = data[0]; in tasdev_load_blk()
1542 if (ret < 0) in tasdev_load_blk()
1547 if (block->nr_retry > 0) in tasdev_load_blk()
1549 } else if (ret < 0) { in tasdev_load_blk()
1557 if (block->nr_retry > 0) in tasdev_load_blk()
1559 } else if (ret < 0) { in tasdev_load_blk()
1568 "Blk YChkSum: FW = 0x%x, YCRC = 0x%x\n", in tasdev_load_blk()
1573 ret = 0; in tasdev_load_blk()
1586 int ret = 0; in tasdevice_load_block()
1590 return 0; in tasdevice_load_block()
1592 if (ret < 0) in tasdevice_load_block()
1605 int rc = 0; in dspfw_default_callback()
1607 if (drv_ver == 0x100) { in dspfw_default_callback()
1617 } else if (ppcver == 0x00) { in dspfw_default_callback()
1628 "Wrong PPCVer :0x%08x\n", ppcver); in dspfw_default_callback()
1632 dev_err(tas_priv->dev, "Wrong DrvVer : 0x%02x\n", drv_ver); in dspfw_default_callback()
1645 static const unsigned char magic_number[] = {0x35, 0x35, 0x35, 0x32, }; in fw_parse_header()
1688 int offset = 0, ret = 0; in tasdevice_dspfw_ready()
1709 case 0x301: in tasdevice_dspfw_ready()
1710 case 0x302: in tasdevice_dspfw_ready()
1711 case 0x502: in tasdevice_dspfw_ready()
1712 case 0x503: in tasdevice_dspfw_ready()
1722 case 0x202: in tasdevice_dspfw_ready()
1723 case 0x400: in tasdevice_dspfw_ready()
1742 if (offset < 0) in tasdevice_dspfw_ready()
1747 if (offset < 0) in tasdevice_dspfw_ready()
1752 if (offset < 0) in tasdevice_dspfw_ready()
1795 for (i = 0; i < tas_dt->nr_blk; i++) { in tasdev_dsp_prog_blk_remove()
1808 for (i = 0; i < nr; i++) in tasdev_dsp_prog_remove()
1826 for (i = 0; i < tas_dt->nr_blk; i++) { in tasdev_dsp_cfg_blk_remove()
1840 for (i = 0; i < nr; i++) in tasdev_dsp_cfg_remove()
1874 for (i = 0; i < tas_fmw->nr_calibrations; i++) { in tas2781_clear_calfirmware()
1882 for (blks = 0; blks < calibration->dev_data.nr_blk; blks++) { in tas2781_clear_calfirmware()
1916 for (i = 0; i < rca->ncfgs; i++) { in tasdevice_spi_config_info_remove()
1920 for (j = 0; j < ci[i]->real_nblocks; j++) { in tasdevice_spi_config_info_remove()
1939 int ret = 0; in tasdevice_load_data()
1941 for (i = 0; i < dev_data->nr_blk; i++) { in tasdevice_load_data()
1944 if (ret < 0) in tasdevice_load_data()
1958 int ret = 0; in tasdevice_spi_prmg_load()
1964 if (prm_no >= 0 && prm_no <= tas_fmw->nr_programs) { in tasdevice_spi_prmg_load()
1965 tas_priv->cur_conf = 0; in tasdevice_spi_prmg_load()
1969 if (ret < 0) { in tasdevice_spi_prmg_load()
1977 if (ret < 0) in tasdevice_spi_prmg_load()
2000 if (state == 0) in tasdevice_spi_tuning_switch()