From patchwork Tue Dec 13 15:48:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 131119 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6779C1007D3 for ; Wed, 14 Dec 2011 02:41:45 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RaUSt-0006EJ-Ma; Tue, 13 Dec 2011 15:40:23 +0000 Received: from mail-gy0-f177.google.com ([209.85.160.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RaUSk-0006DG-Tj; Tue, 13 Dec 2011 15:40:15 +0000 Received: by mail-gy0-f177.google.com with SMTP id f20so567818ghb.36 for ; Tue, 13 Dec 2011 07:40:14 -0800 (PST) Received: by 10.50.153.133 with SMTP id vg5mr20625983igb.80.1323790814621; Tue, 13 Dec 2011 07:40:14 -0800 (PST) Received: from localhost.localdomain ([117.82.23.66]) by mx.google.com with ESMTPS id zs7sm48202814igb.0.2011.12.13.07.40.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 07:40:13 -0800 (PST) From: Shawn Guo To: Vinod Koul , Chris Ball , Artem Bityutskiy Subject: [PATCH 1/4] dmaengine: add DMA_TRANS_NONE to dma_transfer_direction Date: Tue, 13 Dec 2011 23:48:03 +0800 Message-Id: <1323791286-29574-2-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1323791286-29574-1-git-send-email-shawn.guo@linaro.org> References: <1323791286-29574-1-git-send-email-shawn.guo@linaro.org> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Huang Shijie , linux-mtd@lists.infradead.org, Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- drivers/dma/mxs-dma.c | 2 +- include/linux/dmaengine.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index bdf4672..ff89211 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -417,7 +417,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 5532bb8..679b349 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -88,6 +88,7 @@ enum dma_transfer_direction { DMA_MEM_TO_DEV, DMA_DEV_TO_MEM, DMA_DEV_TO_DEV, + DMA_TRANS_NONE, }; /**