spi: rspi: Handle dmaengine_prep_slave_sg() failures gracefully
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 9 Jul 2014 10:26:22 +0000 (12:26 +0200)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:24:24 +0000 (09:24 +0900)
commit11231925256dc5eca63a875a6b5cf0766973926e
tree191d50a1867cbd91d6dbcbca981d5dd977769fd5
parent5356a7ee78db7aa47eb6f345c01d0439ff8dcafd
spi: rspi: Handle dmaengine_prep_slave_sg() 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_sg() may start failing arbitrarily.

Handle dmaengine_prep_slave_sg() failures gracefully by falling back to
PIO.

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 85912a88c1ebcad04a5cfec971771195ce8d6691)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/spi/spi-rspi.c