spi: sh-msiof: Handle dmaengine_prep_slave_single() failures gracefully
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 9 Jul 2014 10:26:23 +0000 (12:26 +0200)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:24:22 +0000 (09:24 +0900)
commitbe26c67a437bab9b300710aea9480cc5172a445f
tree6f6f895e16c51ec0a36f68a7b8b81fc6cd52a199
parentdddd84fad1d1b9cafa13f1eaa9fbd448fbcc7db9
spi: sh-msiof: Handle dmaengine_prep_slave_single() failures gracefully

As typically a shmobile SoC has less DMA channels than devices that can use
DMA, we may want to prioritize access to the DMA channels in the future.
This means that dmaengine_prep_slave_single() may start failing
arbitrarily.

Handle dmaengine_prep_slave_single() failures gracefully by falling back to
PIO. This requires moving DMA-specific configuration of the MSIOF device
after the call(s) to dmaengine_prep_slave_single().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 279d2378c9c4f05bbe41b55625b4003871026266)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/spi/spi-sh-msiof.c