Lines Matching refs:t

63 	int (*txrx_bufs)(struct spi_device *spi, struct spi_transfer *t);
230 static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_setupxfer() argument
238 if (t) { in au1550_spi_setupxfer()
239 if (t->bits_per_word) in au1550_spi_setupxfer()
240 bpw = t->bits_per_word; in au1550_spi_setupxfer()
241 if (t->speed_hz) in au1550_spi_setupxfer()
242 hz = t->speed_hz; in au1550_spi_setupxfer()
315 static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_dma_txrxb() argument
322 hw->len = t->len; in au1550_spi_dma_txrxb()
326 hw->tx = t->tx_buf; in au1550_spi_dma_txrxb()
327 hw->rx = t->rx_buf; in au1550_spi_dma_txrxb()
328 dma_tx_addr = t->tx_dma; in au1550_spi_dma_txrxb()
329 dma_rx_addr = t->rx_dma; in au1550_spi_dma_txrxb()
339 if (t->tx_buf) { in au1550_spi_dma_txrxb()
340 if (t->tx_dma == 0) { /* if DMA_ADDR_INVALID, map it */ in au1550_spi_dma_txrxb()
342 (void *)t->tx_buf, in au1550_spi_dma_txrxb()
343 t->len, DMA_TO_DEVICE); in au1550_spi_dma_txrxb()
349 if (t->rx_buf) { in au1550_spi_dma_txrxb()
350 if (t->rx_dma == 0) { /* if DMA_ADDR_INVALID, map it */ in au1550_spi_dma_txrxb()
352 (void *)t->rx_buf, in au1550_spi_dma_txrxb()
353 t->len, DMA_FROM_DEVICE); in au1550_spi_dma_txrxb()
358 if (t->len > hw->dma_rx_tmpbuf_size) { in au1550_spi_dma_txrxb()
362 ret = au1550_spi_dma_rxtmp_alloc(hw, max(t->len, in au1550_spi_dma_txrxb()
370 t->len, DMA_FROM_DEVICE); in au1550_spi_dma_txrxb()
373 if (!t->tx_buf) { in au1550_spi_dma_txrxb()
375 t->len, DMA_BIDIRECTIONAL); in au1550_spi_dma_txrxb()
381 t->len, DDMA_FLAGS_IE); in au1550_spi_dma_txrxb()
386 t->len, DDMA_FLAGS_IE); in au1550_spi_dma_txrxb()
406 if (!t->rx_buf) { in au1550_spi_dma_txrxb()
408 dma_sync_single_for_cpu(hw->dev, dma_rx_addr, t->len, in au1550_spi_dma_txrxb()
412 if (t->rx_buf && t->rx_dma == 0 ) in au1550_spi_dma_txrxb()
413 dma_unmap_single(hw->dev, dma_rx_addr, t->len, in au1550_spi_dma_txrxb()
415 if (t->tx_buf && t->tx_dma == 0 ) in au1550_spi_dma_txrxb()
416 dma_unmap_single(hw->dev, dma_tx_addr, t->len, in au1550_spi_dma_txrxb()
513 static int au1550_spi_pio_txrxb(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_pio_txrxb() argument
518 hw->tx = t->tx_buf; in au1550_spi_pio_txrxb()
519 hw->rx = t->rx_buf; in au1550_spi_pio_txrxb()
520 hw->len = t->len; in au1550_spi_pio_txrxb()
646 static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) in au1550_spi_txrx_bufs() argument
649 return hw->txrx_bufs(spi, t); in au1550_spi_txrx_bufs()