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)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:15:34 +0000 (11:15 +0100)
commit10fcd0143d6b8f9f40bc2685722379a6ad98e8b5
tree7cba69b2532d54d0b7d30fa073039e7601e7bba6
parent713a9a7b546afa7d35115dcfdf84005544319736
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