spi: davinci: enable DMA when channels are defined in DT
authorFabien Parent <fparent@baylibre.com>
Thu, 23 Feb 2017 18:01:57 +0000 (19:01 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2017 14:10:25 +0000 (15:10 +0100)
commit3e2e1258443ea97e40dfb4a3cf15108d17939066
tree33272006c2169753756f74def8702794ad8f9ab7
parent8aedbf580d21121d2a032e4c8ea12d8d2d85e275
spi: davinci: enable DMA when channels are defined in DT

When booting with DT the SPI driver is always using
the SPI_IO_TYPE_INTR mode to transfer data even if DMA channels are
defined in the DT.

This commit changes the behaviour to select the SPI_IO_TYPE_DMA mode
if DMA channels are defined in the DT and will keep SPI_IO_TYPE_INTR
if the channels are not defined in it.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Frode Isaksen <fisaksen@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c