Lines Matching refs:t
102 struct spi_transfer *t, bool is_dma_mapped) in fsl_spi_cpm_bufs() argument
115 if (!t->tx_buf) { in fsl_spi_cpm_bufs()
120 if (!t->rx_buf) { in fsl_spi_cpm_bufs()
124 if (t->bits_per_word == 16 && t->tx_buf) { in fsl_spi_cpm_bufs()
125 const u16 *src = t->tx_buf; in fsl_spi_cpm_bufs()
129 dst = kmalloc(t->len, GFP_KERNEL); in fsl_spi_cpm_bufs()
133 for (i = 0; i < t->len >> 1; i++) in fsl_spi_cpm_bufs()
143 mspi->tx_dma = dma_map_single(dev, nonconst_tx, t->len, in fsl_spi_cpm_bufs()
149 } else if (t->tx_buf) { in fsl_spi_cpm_bufs()
150 mspi->tx_dma = t->tx_dma; in fsl_spi_cpm_bufs()
154 mspi->rx_dma = dma_map_single(dev, mspi->rx, t->len, in fsl_spi_cpm_bufs()
160 } else if (t->rx_buf) { in fsl_spi_cpm_bufs()
161 mspi->rx_dma = t->rx_dma; in fsl_spi_cpm_bufs()
167 mspi->xfer_in_progress = t; in fsl_spi_cpm_bufs()
168 mspi->count = t->len; in fsl_spi_cpm_bufs()
177 dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE); in fsl_spi_cpm_bufs()
185 struct spi_transfer *t = mspi->xfer_in_progress; in fsl_spi_cpm_bufs_complete() local
188 dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE); in fsl_spi_cpm_bufs_complete()
190 dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE); in fsl_spi_cpm_bufs_complete()
193 if (t->bits_per_word == 16 && t->rx_buf) { in fsl_spi_cpm_bufs_complete()
196 for (i = 0; i < t->len; i += 2) in fsl_spi_cpm_bufs_complete()
197 le16_to_cpus(t->rx_buf + i); in fsl_spi_cpm_bufs_complete()