Lines Matching refs:tfr

127 	struct spi_transfer *tfr;  member
399 struct spi_transfer *tfr, in bcm2835_spi_transfer_one_irq() argument
473 struct spi_transfer *tfr, in bcm2835_spi_transfer_prologue() argument
479 bs->tfr = tfr; in bcm2835_spi_transfer_prologue()
484 if (bs->tx_buf && !sg_is_last(&tfr->tx_sg.sgl[0])) in bcm2835_spi_transfer_prologue()
485 bs->tx_prologue = sg_dma_len(&tfr->tx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue()
487 if (bs->rx_buf && !sg_is_last(&tfr->rx_sg.sgl[0])) { in bcm2835_spi_transfer_prologue()
488 bs->rx_prologue = sg_dma_len(&tfr->rx_sg.sgl[0]) & 3; in bcm2835_spi_transfer_prologue()
491 if (!bs->tx_buf || sg_is_last(&tfr->tx_sg.sgl[0])) { in bcm2835_spi_transfer_prologue()
496 !(sg_dma_len(&tfr->tx_sg.sgl[0]) & ~3); in bcm2835_spi_transfer_prologue()
518 sg_dma_address(&tfr->rx_sg.sgl[0]), in bcm2835_spi_transfer_prologue()
521 sg_dma_address(&tfr->rx_sg.sgl[0]) += bs->rx_prologue; in bcm2835_spi_transfer_prologue()
522 sg_dma_len(&tfr->rx_sg.sgl[0]) -= bs->rx_prologue; in bcm2835_spi_transfer_prologue()
544 sg_dma_address(&tfr->tx_sg.sgl[0]) += bs->tx_prologue; in bcm2835_spi_transfer_prologue()
545 sg_dma_len(&tfr->tx_sg.sgl[0]) -= bs->tx_prologue; in bcm2835_spi_transfer_prologue()
547 sg_dma_len(&tfr->tx_sg.sgl[0]) = 0; in bcm2835_spi_transfer_prologue()
548 sg_dma_address(&tfr->tx_sg.sgl[1]) += 4; in bcm2835_spi_transfer_prologue()
549 sg_dma_len(&tfr->tx_sg.sgl[1]) -= 4; in bcm2835_spi_transfer_prologue()
563 struct spi_transfer *tfr = bs->tfr; in bcm2835_spi_undo_prologue() local
569 sg_dma_address(&tfr->rx_sg.sgl[0]) -= bs->rx_prologue; in bcm2835_spi_undo_prologue()
570 sg_dma_len(&tfr->rx_sg.sgl[0]) += bs->rx_prologue; in bcm2835_spi_undo_prologue()
577 sg_dma_address(&tfr->tx_sg.sgl[0]) -= bs->tx_prologue; in bcm2835_spi_undo_prologue()
578 sg_dma_len(&tfr->tx_sg.sgl[0]) += bs->tx_prologue; in bcm2835_spi_undo_prologue()
580 sg_dma_len(&tfr->tx_sg.sgl[0]) = bs->tx_prologue - 4; in bcm2835_spi_undo_prologue()
581 sg_dma_address(&tfr->tx_sg.sgl[1]) -= 4; in bcm2835_spi_undo_prologue()
582 sg_dma_len(&tfr->tx_sg.sgl[1]) += 4; in bcm2835_spi_undo_prologue()
661 struct spi_transfer *tfr, in bcm2835_spi_prepare_sg() argument
677 nents = tfr->tx_sg.nents; in bcm2835_spi_prepare_sg()
678 sgl = tfr->tx_sg.sgl; in bcm2835_spi_prepare_sg()
679 flags = tfr->rx_buf ? 0 : DMA_PREP_INTERRUPT; in bcm2835_spi_prepare_sg()
683 nents = tfr->rx_sg.nents; in bcm2835_spi_prepare_sg()
684 sgl = tfr->rx_sg.sgl; in bcm2835_spi_prepare_sg()
699 } else if (!tfr->rx_buf) { in bcm2835_spi_prepare_sg()
760 struct spi_transfer *tfr, in bcm2835_spi_transfer_one_dma() argument
774 bcm2835_spi_transfer_prologue(ctlr, tfr, bs, cs); in bcm2835_spi_transfer_one_dma()
778 ret = bcm2835_spi_prepare_sg(ctlr, spi, tfr, bs, true); in bcm2835_spi_transfer_one_dma()
804 ret = bcm2835_spi_prepare_sg(ctlr, spi, tfr, bs, false); in bcm2835_spi_transfer_one_dma()
842 struct spi_transfer *tfr) in bcm2835_spi_can_dma() argument
845 if (tfr->len < BCM2835_SPI_DMA_MIN_LENGTH) in bcm2835_spi_can_dma()
1013 struct spi_transfer *tfr, in bcm2835_spi_transfer_one_poll() argument
1056 tfr, cs, false); in bcm2835_spi_transfer_one_poll()
1068 struct spi_transfer *tfr) in bcm2835_spi_transfer_one() argument
1076 spi_hz = tfr->speed_hz; in bcm2835_spi_transfer_one()
1095 if (spi->mode & SPI_3WIRE && tfr->rx_buf) in bcm2835_spi_transfer_one()
1099 bs->tx_buf = tfr->tx_buf; in bcm2835_spi_transfer_one()
1100 bs->rx_buf = tfr->rx_buf; in bcm2835_spi_transfer_one()
1101 bs->tx_len = tfr->len; in bcm2835_spi_transfer_one()
1102 bs->rx_len = tfr->len; in bcm2835_spi_transfer_one()
1114 if (tfr->len < byte_limit) in bcm2835_spi_transfer_one()
1115 return bcm2835_spi_transfer_one_poll(ctlr, spi, tfr, cs); in bcm2835_spi_transfer_one()
1121 if (ctlr->can_dma && bcm2835_spi_can_dma(ctlr, spi, tfr)) in bcm2835_spi_transfer_one()
1122 return bcm2835_spi_transfer_one_dma(ctlr, spi, tfr, cs); in bcm2835_spi_transfer_one()
1125 return bcm2835_spi_transfer_one_irq(ctlr, spi, tfr, cs, true); in bcm2835_spi_transfer_one()