When transfer length is smaller than fifo-size in DMA mode,
it is transferred by CPU mode not DMA. This patch makes spi_map
function not executed in this case.
Change-Id: Iec9f52f83b1a8abefed67af3276f2194df90e9e4
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
if ((msg->is_dma_mapped) || (sci->dma_mode != DMA_MODE))
return 0;
+ if (xfer->len <= ((FIFO_LVL_MASK(sdd) >> 1) + 1))
+ return 0;
+
if (xfer->tx_buf != NULL) {
xfer->tx_dma = dma_map_single(dev,
(void *)xfer->tx_buf, xfer->len,
if ((msg->is_dma_mapped) || (sci->dma_mode != DMA_MODE))
return;
+ if (xfer->len <= ((FIFO_LVL_MASK(sdd) >> 1) + 1))
+ return;
+
if (xfer->rx_buf != NULL
&& xfer->rx_dma != XFER_DMAADDR_INVALID)
dma_unmap_single(dev, xfer->rx_dma,