]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw-dma: Set DMA Level registers on init
authorBaikal Electronics <support@baikalelectronics.ru>
Sun, 20 Sep 2020 11:23:12 +0000 (14:23 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 29 Sep 2020 15:37:06 +0000 (16:37 +0100)
commit9962407d8aac4f50c934b68e21107070d3ed01e7
treec89399a2dd3a88c40a3b10f943a403ed8a66b671
parent8b79539c3fae194592d5c94bc8bfb70a8f28fd48
spi: dw-dma: Set DMA Level registers on init

Indeed the registers content doesn't get cleared when the SPI controller
is disabled and enabled. Max burst lengths aren't changed since the Rx and
Tx DMA channels are requested on init stage and are kept acquired until
the device is removed. Obviously SPI controller FIFO depth can't be
changed. Due to all of that we can safely move the DMA Transmit and
Receive data level registers initialization to the SPI controller DMA init
stage (when the SPI controller is being probed) instead of doing it for
each SPI transfer when dma_setup is called. This shall speed the DMA-based
SPI transfer initialization up a bit, particularly if the APB bus is
relatively slow.

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