From patchwork Tue Apr 15 15:13:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3993701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C3F9A9F2CC for ; Tue, 15 Apr 2014 15:16:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC0E42020F for ; Tue, 15 Apr 2014 15:16:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BEB620200 for ; Tue, 15 Apr 2014 15:16:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wa53q-0006Ui-K2; Tue, 15 Apr 2014 15:14:10 +0000 Received: from perceval.ideasonboard.com ([95.142.166.194]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wa53i-00063B-Os for linux-arm-kernel@lists.infradead.org; Tue, 15 Apr 2014 15:14:03 +0000 Received: from avalon.ideasonboard.com (55.138-246-81.adsl-dyn.isp.belgacom.be [81.246.138.55]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 516E9359FA; Tue, 15 Apr 2014 17:11:37 +0200 (CEST) From: Laurent Pinchart To: dmaengine@vger.kernel.org Subject: [PATCH 1/6] dmaengine: Add fly-by transfer flag to slave configuration structure Date: Tue, 15 Apr 2014 17:13:32 +0200 Message-Id: <1397574817-15559-2-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1397574817-15559-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1397574817-15559-1-git-send-email-laurent.pinchart@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140415_081402_987651_34B63EBC X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Xiang Wang , linux-arm-kernel@lists.infradead.org, Daniel Mack X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fly-by transfer mode cuts down the number of bus transactions by letting the slave drive or latch the memory data bus during memory transactions instead of performing a dedicated transaction to read data from or write data to the slave. Support for fly-by mode by adding a new flag field to struct dma_slave_config. Signed-off-by: Laurent Pinchart --- include/linux/dmaengine.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index c5c92d5..ae99153 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -304,6 +304,17 @@ enum dma_slave_buswidth { }; /** + * enum dma_slave_flags - DMA slave configuration flags + * @DMA_SLAVE_FLAG_FLY_BY - perform DMA transfers for the slave in fly-by mode. + * Instead of performing a bus transaction to read (write) data from (to) the + * slave, let the slave drive (latch) the memory bus data signals during the + * memory write (read) transaction. + */ +enum dma_slave_flags { + DMA_SLAVE_FLAG_FLY_BY = (1 << 0), +}; + +/** * struct dma_slave_config - dma slave channel runtime config * @direction: whether the data shall go in or out on this slave * channel, right now. DMA_MEM_TO_DEV and DMA_DEV_TO_MEM are @@ -333,6 +344,7 @@ enum dma_slave_buswidth { * @slave_id: Slave requester id. Only valid for slave channels. The dma * slave peripheral will have unique id as dma requester which need to be * pass as slave config. + * @flags: DMA slave flags, a combination of enum dma_slave_flags flags. * * This struct is passed in as configuration data to a DMA engine * in order to set up a certain channel for DMA transport at runtime. @@ -361,6 +373,7 @@ struct dma_slave_config { u32 dst_maxburst; bool device_fc; unsigned int slave_id; + u32 flags; }; /**