]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw-dma: Pass exact data to the DMA submit and wait methods
authorBaikal Electronics <support@baikalelectronics.ru>
Sun, 20 Sep 2020 11:23:21 +0000 (14:23 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 29 Sep 2020 15:37:14 +0000 (16:37 +0100)
commita5a8b8f8c3c0d25dd11ec64d27b41f57b2b39dd9
treebca54d9252d75c5a4c68f778b663fac95e870c3c
parent4c82b1812170d08a7740f6be763e6790df8134ab
spi: dw-dma: Pass exact data to the DMA submit and wait methods

In order to use the DMA submission and waiting methods in both generic
DMA-based SPI transfer and one-by-one DMA SG entries transmission
functions, we need to modify the dw_spi_dma_wait() and
dw_spi_dma_submit_tx()/dw_spi_dma_submit_rx() prototypes. So instead of
getting the SPI transfer object as the second argument they must accept
the exact data structure instances they imply to use. Those are the
current transfer length and the SPI bus frequency in case of
dw_spi_dma_wait(), and SG list together with number of list entries in
case of the DMA Tx/Rx submission methods.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20200920112322.24585-11-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-dma.c