spi: dw-dma: Set DMA Level registers on init
authorSerge Semin <Sergey.Semin@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)
commit01ddbbb0b0af255d93b279f83c4ff91d494397d9
treec89399a2dd3a88c40a3b10f943a403ed8a66b671
parent0e9683659c6926fd3f30345f9f58893e630379ed
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