Lines Matching refs:total_length
117 int total_length = 0, ret; in st33zp24_spi_write() local
124 tx_buf[total_length++] = TPM_WRITE_DIRECTION | LOCALITY0; in st33zp24_spi_write()
125 tx_buf[total_length++] = tpm_register; in st33zp24_spi_write()
128 tx_buf[total_length++] = tpm_size >> 8; in st33zp24_spi_write()
129 tx_buf[total_length++] = tpm_size; in st33zp24_spi_write()
131 memcpy(tx_buf + total_length, tpm_data, tpm_size); in st33zp24_spi_write()
132 total_length += tpm_size; in st33zp24_spi_write()
134 memset(tx_buf + total_length, TPM_DUMMY_BYTE, phy->latency); in st33zp24_spi_write()
136 total_length += phy->latency; in st33zp24_spi_write()
142 ret = spi_xfer(slave, total_length * 8, tx_buf, rx_buf, in st33zp24_spi_write()
150 ret = rx_buf[total_length - 1]; in st33zp24_spi_write()
168 int total_length = 0, ret; in st33zp24_spi_read8_reg() local
176 tx_buf[total_length++] = LOCALITY0; in st33zp24_spi_read8_reg()
177 tx_buf[total_length++] = tpm_register; in st33zp24_spi_read8_reg()
179 memset(&tx_buf[total_length], TPM_DUMMY_BYTE, in st33zp24_spi_read8_reg()
181 total_length += phy->latency + tpm_size; in st33zp24_spi_read8_reg()
187 ret = spi_xfer(slave, total_length * 8, tx_buf, rx_buf, in st33zp24_spi_read8_reg()
195 ret = rx_buf[total_length - tpm_size - 1]; in st33zp24_spi_read8_reg()
196 memcpy(tpm_data, rx_buf + total_length - tpm_size, tpm_size); in st33zp24_spi_read8_reg()