blob: b3bc13296a62a5fb722a886cd3e2ef2563d13ede [file] [log] [blame]
From d063219e6c8f9f5ec4f6b03c874f0e77d4ffc686 Mon Sep 17 00:00:00 2001
From: Shawn Guo <shawn.guo@linaro.org>
Date: Tue, 13 Dec 2011 23:48:03 +0800
Subject: dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Before dma_transfer_direction was introduced to replace
dma_data_direction, some dmaengine device uses DMA_NONE of
dma_data_direction for some talk with its client drivers.
The mxs-dma and its clients mxs-mmc and gpmi-nand are such case.
This patch adds DMA_TRANS_NONE to dma_transfer_direction and
migrate the DMA_NONE use in mxs-dma to it.
It also fixes the compile warning below.
CC drivers/dma/mxs-dma.o
drivers/dma/mxs-dma.c: In function mxs_dma_prep_slave_sg’:
drivers/dma/mxs-dma.c:420:16: warning: comparison between enum dma_transfer_direction and enum dma_data_direction
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
(cherry picked from commit 62268ce9170c5466332c046ff6ddafcb67751502)
Signed-off-by: Simon Horman <horms@verge.net.au>
---
drivers/dma/mxs-dma.c | 2 +-
include/linux/dmaengine.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index 88aad4f..428903d 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -412,7 +412,7 @@ static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
idx = 0;
}
- if (direction == DMA_NONE) {
+ if (direction == DMA_TRANS_NONE) {
ccw = &mxs_chan->ccw[idx++];
pio = (u32 *) sgl;
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 3489430..18e71fd 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -91,6 +91,7 @@ enum dma_transfer_direction {
DMA_MEM_TO_DEV,
DMA_DEV_TO_MEM,
DMA_DEV_TO_DEV,
+ DMA_TRANS_NONE,
};
/**
--
1.7.10.2.565.gbd578b5