spi: s3c64xx: requests spi-dma channel only during data transfer
authorAdithya K V <adithya.kv@samsung.com>
Tue, 24 May 2022 14:01:32 +0000 (19:31 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 11:39:17 +0000 (12:39 +0100)
commitf52b03c707444c5a3d1a0b9c5724f93ddc3c588e
treefbbd7feb679912eea3fe8551449cbe95500392b1
parent8e3ca32f46994e74b7f43c57731150b2aedb2630
spi: s3c64xx: requests spi-dma channel only during data transfer

Current s3c64xx SPI driver acquires DMA channel during driver
probe and holds on it even when channels are not used
(no DMA transfer). This is a problem especially when all the
DMA channels are exhausted (as other IPs on the same DMA
controller also acquires DMA channel) and if a new IP/Device
requests for a DMA channel (on the same DMA controller), it won’t
get DMA channel allocated.
The said issue can be avoided if s3c64xx driver request and
release DMA channel before and after data transfer. Let’s modify
the driver to request and release DMA channel before and after
DMA mode data transfer.

Signed-off-by: Adithya K V <adithya.kv@samsung.com>
Link: https://lore.kernel.org/r/20220524140132.59300-1-adithya.kv@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c