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)
committerMark Brown <broonie@linaro.org>
Wed, 16 Jul 2014 21:41:51 +0000 (22:41 +0100)
commit279d2378c9c4f05bbe41b55625b4003871026266
treec07d111eb25b18e62addcd98e311013c8c0e486b
parent51fd509046f71471e606f3fd76411d238c3b5d39
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>
drivers/spi/spi-sh-msiof.c