spi: omap2-mcspi: Use the SPI framework to handle DMA mapping
authorFranklin S Cooper Jr <fcooper@ti.com>
Thu, 7 Jul 2016 17:17:50 +0000 (12:17 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 8 Jul 2016 08:48:02 +0000 (10:48 +0200)
commit0ba1870f886501beca0e2c19ec367a85ae201ea8
tree7774d58c85024187752dd10adaebd0aedaa54065
parent2b32e987c48c65a1a40b3b4294435f761e063b6b
spi: omap2-mcspi: Use the SPI framework to handle DMA mapping

Currently, the driver handles mapping buffers to be used by the DMA.
However, there are times that the current mapping implementation will
fail for certain buffers. Fortunately, the SPI framework can detect
and map buffers so its usable by the DMA.

Update the driver to utilize the SPI framework for buffer
mapping instead. Also incorporate hooks that the framework uses to
determine if the DMA can or can not be used.

This will result in the original omap2_mcspi_transfer_one function being
deleted and omap2_mcspi_work_one being renamed to
omap2_mcspi_transfer_one. Previously transfer_one was only responsible
for mapping and work_one handled the transfer. But now only transferring
needs to be handled by the driver.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-omap2-mcspi.c