spi: s3c64xx: Don't request/release DMA channels for each SPI transfer
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 9 Jan 2017 10:36:10 +0000 (11:36 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 9 Jan 2017 12:21:04 +0000 (12:21 +0000)
commit3d63a47a380a873408dad10ca62bd8299b2208f1
tree14ad2c65ae0f53b4dfb674b6b643e09eeed47a61
parent5c47e3cfd4f9d12e9f594d99118c1381c163ff98
spi: s3c64xx: Don't request/release DMA channels for each SPI transfer

Requesting a DMA channel might be a time consuming operation, so there is
no need to acquire and release DMA channel for each SPI transfer.
DMA channels can be requested during driver probe and kept all the time,
also because there are no shared nor dynamically allocated channels on
Samsung S3C/S5P/Exynos platforms.

While moving dma_requrest_slave_channel calls, lets switch to
dma_request_slave_channel_reason(), which returns error codes on failure,
which can be properly propagated to the caller (this for example defers
SPI probe when DMA controller is not yet available).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Tested-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c