Lines Matching refs:t

54 	int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t);
220 static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_setupxfer() argument
226 if (t) { in au1550_spi_setupxfer()
227 bpw = t->bits_per_word; in au1550_spi_setupxfer()
228 hz = t->speed_hz; in au1550_spi_setupxfer()
304 static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_dma_txrxb() argument
311 hw->len = t->len; in au1550_spi_dma_txrxb()
315 hw->tx = t->tx_buf; in au1550_spi_dma_txrxb()
316 hw->rx = t->rx_buf; in au1550_spi_dma_txrxb()
317 dma_tx_addr = t->tx_dma; in au1550_spi_dma_txrxb()
318 dma_rx_addr = t->rx_dma; in au1550_spi_dma_txrxb()
328 if (t->tx_buf) { in au1550_spi_dma_txrxb()
329 if (t->tx_dma == 0) { /* if DMA_ADDR_INVALID, map it */ in au1550_spi_dma_txrxb()
331 (void *)t->tx_buf, in au1550_spi_dma_txrxb()
332 t->len, DMA_TO_DEVICE); in au1550_spi_dma_txrxb()
338 if (t->rx_buf) { in au1550_spi_dma_txrxb()
339 if (t->rx_dma == 0) { /* if DMA_ADDR_INVALID, map it */ in au1550_spi_dma_txrxb()
341 (void *)t->rx_buf, in au1550_spi_dma_txrxb()
342 t->len, DMA_FROM_DEVICE); in au1550_spi_dma_txrxb()
347 if (t->len > hw->dma_rx_tmpbuf_size) { in au1550_spi_dma_txrxb()
351 ret = au1550_spi_dma_rxtmp_alloc(hw, max(t->len, in au1550_spi_dma_txrxb()
359 t->len, DMA_FROM_DEVICE); in au1550_spi_dma_txrxb()
362 if (!t->tx_buf) { in au1550_spi_dma_txrxb()
364 t->len, DMA_BIDIRECTIONAL); in au1550_spi_dma_txrxb()
370 t->len, DDMA_FLAGS_IE); in au1550_spi_dma_txrxb()
375 t->len, DDMA_FLAGS_IE); in au1550_spi_dma_txrxb()
395 if (!t->rx_buf) { in au1550_spi_dma_txrxb()
397 dma_sync_single_for_cpu(hw->dev, dma_rx_addr, t->len, in au1550_spi_dma_txrxb()
401 if (t->rx_buf && t->rx_dma == 0) in au1550_spi_dma_txrxb()
402 dma_unmap_single(hw->dev, dma_rx_addr, t->len, in au1550_spi_dma_txrxb()
404 if (t->tx_buf && t->tx_dma == 0) in au1550_spi_dma_txrxb()
405 dma_unmap_single(hw->dev, dma_tx_addr, t->len, in au1550_spi_dma_txrxb()
502 static int au1550_spi_pio_txrxb(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_pio_txrxb() argument
507 hw->tx = t->tx_buf; in au1550_spi_pio_txrxb()
508 hw->rx = t->rx_buf; in au1550_spi_pio_txrxb()
509 hw->len = t->len; in au1550_spi_pio_txrxb()
635 static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_txrx_bufs() argument
639 return hw->txrx_bufs(spi, t); in au1550_spi_txrx_bufs()