Lines Matching refs:t

259 	struct spi_transfer *t)  in tegra_spi_calculate_curr_xfer_param()  argument
261 unsigned remain_len = t->len - tspi->cur_pos; in tegra_spi_calculate_curr_xfer_param()
263 unsigned bits_per_word = t->bits_per_word; in tegra_spi_calculate_curr_xfer_param()
270 bits_per_word == 32) && t->len > 3) { in tegra_spi_calculate_curr_xfer_param()
292 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_fill_tx_fifo_from_client_txbuf() argument
301 u8 *tx_buf = (u8 *)t->tx_buf + tspi->cur_tx_pos; in tegra_spi_fill_tx_fifo_from_client_txbuf()
325 if (nbytes > t->len - tspi->cur_pos) in tegra_spi_fill_tx_fifo_from_client_txbuf()
326 nbytes = t->len - tspi->cur_pos; in tegra_spi_fill_tx_fifo_from_client_txbuf()
344 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_read_rx_fifo_to_client_rxbuf() argument
351 u8 *rx_buf = (u8 *)t->rx_buf + tspi->cur_rx_pos; in tegra_spi_read_rx_fifo_to_client_rxbuf()
366 u32 rx_mask = ((u32)1 << t->bits_per_word) - 1; in tegra_spi_read_rx_fifo_to_client_rxbuf()
371 if (len > t->len - tspi->cur_pos) in tegra_spi_read_rx_fifo_to_client_rxbuf()
372 len = t->len - tspi->cur_pos; in tegra_spi_read_rx_fifo_to_client_rxbuf()
388 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_copy_client_txbuf_to_spi_txbuf() argument
397 memcpy(tspi->tx_dma_buf, t->tx_buf + tspi->cur_pos, len); in tegra_spi_copy_client_txbuf_to_spi_txbuf()
402 u8 *tx_buf = (u8 *)t->tx_buf + tspi->cur_tx_pos; in tegra_spi_copy_client_txbuf_to_spi_txbuf()
406 if (consume > t->len - tspi->cur_pos) in tegra_spi_copy_client_txbuf_to_spi_txbuf()
407 consume = t->len - tspi->cur_pos; in tegra_spi_copy_client_txbuf_to_spi_txbuf()
427 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_copy_spi_rxbuf_to_client_rxbuf() argument
436 memcpy(t->rx_buf + tspi->cur_rx_pos, tspi->rx_dma_buf, len); in tegra_spi_copy_spi_rxbuf_to_client_rxbuf()
441 unsigned char *rx_buf = t->rx_buf + tspi->cur_rx_pos; in tegra_spi_copy_spi_rxbuf_to_client_rxbuf()
442 u32 rx_mask = ((u32)1 << t->bits_per_word) - 1; in tegra_spi_copy_spi_rxbuf_to_client_rxbuf()
446 if (consume > t->len - tspi->cur_pos) in tegra_spi_copy_spi_rxbuf_to_client_rxbuf()
447 consume = t->len - tspi->cur_pos; in tegra_spi_copy_spi_rxbuf_to_client_rxbuf()
535 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_start_dma_based_transfer() argument
587 tegra_spi_copy_client_txbuf_to_spi_txbuf(tspi, t); in tegra_spi_start_dma_based_transfer()
629 struct tegra_spi_data *tspi, struct spi_transfer *t) in tegra_spi_start_cpu_based_transfer() argument
635 cur_words = tegra_spi_fill_tx_fifo_from_client_txbuf(tspi, t); in tegra_spi_start_cpu_based_transfer()
771 struct spi_transfer *t, in tegra_spi_setup_transfer_one() argument
777 u32 speed = t->speed_hz; in tegra_spi_setup_transfer_one()
778 u8 bits_per_word = t->bits_per_word; in tegra_spi_setup_transfer_one()
792 tspi->curr_xfer = t; in tegra_spi_setup_transfer_one()
832 if (is_single_xfer && !(t->cs_change)) { in tegra_spi_setup_transfer_one()
866 struct spi_transfer *t, u32 command1) in tegra_spi_start_transfer_one() argument
872 total_fifo_words = tegra_spi_calculate_curr_xfer_param(spi, tspi, t); in tegra_spi_start_transfer_one()
874 if (t->rx_nbits == SPI_NBITS_DUAL || t->tx_nbits == SPI_NBITS_DUAL) in tegra_spi_start_transfer_one()
886 if (t->rx_buf) { in tegra_spi_start_transfer_one()
890 if (t->tx_buf) { in tegra_spi_start_transfer_one()
905 ret = tegra_spi_start_dma_based_transfer(tspi, t); in tegra_spi_start_transfer_one()
907 ret = tegra_spi_start_cpu_based_transfer(tspi, t); in tegra_spi_start_transfer_one()
1121 struct spi_transfer *t = tspi->curr_xfer; in handle_cpu_based_xfer() local
1141 tegra_spi_read_rx_fifo_to_client_rxbuf(tspi, t); in handle_cpu_based_xfer()
1148 if (tspi->cur_pos == t->len) { in handle_cpu_based_xfer()
1153 tegra_spi_calculate_curr_xfer_param(tspi->cur_spi, tspi, t); in handle_cpu_based_xfer()
1154 tegra_spi_start_cpu_based_transfer(tspi, t); in handle_cpu_based_xfer()
1162 struct spi_transfer *t = tspi->curr_xfer; in handle_dma_based_xfer() local
1216 tegra_spi_copy_spi_rxbuf_to_client_rxbuf(tspi, t); in handle_dma_based_xfer()
1223 if (tspi->cur_pos == t->len) { in handle_dma_based_xfer()
1230 tspi, t); in handle_dma_based_xfer()
1232 err = tegra_spi_start_dma_based_transfer(tspi, t); in handle_dma_based_xfer()
1234 err = tegra_spi_start_cpu_based_transfer(tspi, t); in handle_dma_based_xfer()