spi/spi-atmel: add dmaengine support
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 3 Apr 2013 05:59:19 +0000 (13:59 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 24 Apr 2013 10:01:07 +0000 (11:01 +0100)
commit1ccc404a7fc48dc39aa9605da9a3e579fca7dbf7
tree5a7d4dd92edc7201f8ea16e6f4beb4372fdc2903
parent8aad7924b5f55e330aebc1351525df9fa0056461
spi/spi-atmel: add dmaengine support

Add dmaengine support.

Using "has_dma_support" member of struct is used to select
the transfer mode: dmaengine or pdc.

For the dmaengine transfer mode, it supports both 8 bits and 16 bits transfer.

For the dmaengine transfer mode, if it fails to config dmaengine,
or if the message length is less than 16 bytes, it will use the PIO transfer mode.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[wenyou.yang@atmel.com: using "has_dma_support" to select dmaengine as the spi xfer mode]
[wenyou.yang@atmel.com: fix DMA: OOPS if buffer > 4096 bytes]
[wenyou.yang@atmel.com: submit the patch]
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
[richard.genoud@gmail.com: update with dmaengine interface]
[richard.genoud@gmail.com: fix __init/__devinit sections mismatch]
[richard.genoud@gmail.com: adapt to slave_config changes]
[richard.genoud@gmail.com: add support t0 16 bits transfer]
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-atmel.c