Lines Matching full:transfer
257 * @transfer_one_dma_start: routine to start transfer a single spi_transfer
308 * @t_size_max: maximum number of data of one transfer
316 * @cur_xferlen: current transfer length in bytes
317 * @cur_usedma: boolean to know if dma is used in current transfer
322 * @dma_tx: dma channel for TX transfer
323 * @dma_rx: dma channel for RX transfer
379 /* SPI data transfer is enabled but spi_ker_ck is idle.
399 /* SPI data transfer is enabled but spi_ker_ck is idle.
897 * stm32_spi_can_dma - Determine if the transfer is eligible for DMA use
900 * @transfer: pointer to spi transfer
902 * If driver has fifo and the current transfer size is greater than fifo size,
903 * use DMA. Otherwise use DMA for transfer longer than defined DMA min bytes.
907 struct spi_transfer *transfer) in stm32_spi_can_dma() argument
918 (transfer->len > dma_size) ? "true" : "false"); in stm32_spi_can_dma()
920 return (transfer->len > dma_size); in stm32_spi_can_dma()
974 * so stop the current transfer. Transfer can wait for next in stm32fx_spi_irq_event()
1077 * that something went wrong, so stop the current transfer in stm32h7_spi_irq_thread()
1084 dev_warn(spi->dev, "Mode fault: transfer aborted\n"); in stm32h7_spi_irq_thread()
1137 * stm32_spi_prepare_msg - set up the controller to transfer a single message
1199 * DMA callback is called when the transfer is complete for DMA TX channel.
1215 * DMA callback is called when the transfer is complete for DMA RX channel.
1227 * transfer bits_per_word.
1231 * @dir: direction of the dma transfer
1279 * stm32fx_spi_transfer_one_irq - transfer a single spi_transfer using
1283 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1312 /* starting data transfer when buffer is loaded */ in stm32fx_spi_transfer_one_irq()
1322 * stm32h7_spi_transfer_one_irq - transfer a single spi_transfer using
1326 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1342 /* Enable the interrupts relative to the end of transfer */ in stm32h7_spi_transfer_one_irq()
1350 /* Be sure to have data in fifo before starting data transfer */ in stm32h7_spi_transfer_one_irq()
1366 * transfer using DMA
1371 /* In DMA mode end of transfer is handled by DMA TX or RX callback. */ in stm32fx_spi_transfer_one_dma_start()
1387 * transfer using DMA
1403 * transfer using DMA
1423 * stm32_spi_transfer_one_dma - transfer a single spi_transfer using DMA
1427 * It must returns 0 if the transfer is finished or 1 if the transfer is still
1521 dev_info(spi->dev, "DMA issue: fall back to irq transfer\n"); in stm32_spi_transfer_one_dma()
1608 * stm32_spi_communication_type - return transfer communication type
1610 * @transfer: pointer to spi transfer
1613 struct spi_transfer *transfer) in stm32_spi_communication_type() argument
1622 * transfer. in stm32_spi_communication_type()
1624 if (!transfer->tx_buf) in stm32_spi_communication_type()
1629 if (!transfer->tx_buf) in stm32_spi_communication_type()
1631 else if (!transfer->rx_buf) in stm32_spi_communication_type()
1705 * @len: transfer len
1731 * stm32h7_spi_number_of_data - configure number of data at current transfer
1733 * @nb_words: transfer length (in words)
1748 * stm32_spi_transfer_one_setup - common setup to transfer a single
1753 * @transfer: pointer to spi transfer
1757 struct spi_transfer *transfer) in stm32_spi_transfer_one_setup() argument
1766 spi->cur_xferlen = transfer->len; in stm32_spi_transfer_one_setup()
1768 spi->cur_bpw = transfer->bits_per_word; in stm32_spi_transfer_one_setup()
1773 mbr = stm32_spi_prepare_mbr(spi, transfer->speed_hz, in stm32_spi_transfer_one_setup()
1781 transfer->speed_hz = spi->cur_speed; in stm32_spi_transfer_one_setup()
1785 comm_type = stm32_spi_communication_type(spi_dev, transfer); in stm32_spi_transfer_one_setup()
1793 spi->cfg->set_data_idleness(spi, transfer->len); in stm32_spi_transfer_one_setup()
1796 nb_words = transfer->len; in stm32_spi_transfer_one_setup()
1798 nb_words = DIV_ROUND_UP(transfer->len * 8, 16); in stm32_spi_transfer_one_setup()
1800 nb_words = DIV_ROUND_UP(transfer->len * 8, 32); in stm32_spi_transfer_one_setup()
1808 dev_dbg(spi->dev, "transfer communication mode set to %d\n", in stm32_spi_transfer_one_setup()
1815 dev_dbg(spi->dev, "transfer of %d bytes (%d data frames)\n", in stm32_spi_transfer_one_setup()
1827 * stm32_spi_transfer_one - transfer a single spi_transfer
1830 * @transfer: pointer to spi transfer
1832 * It must return 0 if the transfer is finished or 1 if the transfer is still
1837 struct spi_transfer *transfer) in stm32_spi_transfer_one() argument
1842 spi->tx_buf = transfer->tx_buf; in stm32_spi_transfer_one()
1843 spi->rx_buf = transfer->rx_buf; in stm32_spi_transfer_one()
1844 spi->tx_len = spi->tx_buf ? transfer->len : 0; in stm32_spi_transfer_one()
1845 spi->rx_len = spi->rx_buf ? transfer->len : 0; in stm32_spi_transfer_one()
1848 ctrl->can_dma(ctrl, spi_dev, transfer)); in stm32_spi_transfer_one()
1850 ret = stm32_spi_transfer_one_setup(spi, spi_dev, transfer); in stm32_spi_transfer_one()
1852 dev_err(spi->dev, "SPI transfer setup failed\n"); in stm32_spi_transfer_one()
1857 return stm32_spi_transfer_one_dma(spi, transfer); in stm32_spi_transfer_one()