From patchwork Tue Apr 15 15:13:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3993681 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 61014BFF02 for ; Tue, 15 Apr 2014 15:13:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98D9D2022A for ; Tue, 15 Apr 2014 15:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CBC72201F9 for ; Tue, 15 Apr 2014 15:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752349AbaDOPNm (ORCPT ); Tue, 15 Apr 2014 11:13:42 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:52306 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbaDOPNl (ORCPT ); Tue, 15 Apr 2014 11:13:41 -0400 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 92D7335A00; Tue, 15 Apr 2014 17:11:38 +0200 (CEST) From: Laurent Pinchart To: dmaengine@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Daniel Mack , Xiang Wang Subject: [PATCH 5/6] dma: mmp_pdma: Add support for fly-by transfers Date: Tue, 15 Apr 2014 17:13:36 +0200 Message-Id: <1397574817-15559-6-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> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Enable fly-by mode when the DMA_SLAVE_FLAG_FLY_BY flag is set in the slave configuration. Signed-off-by: Laurent Pinchart --- drivers/dma/mmp_pdma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index 7ed7850..849bf75 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -63,6 +63,8 @@ #define DCMD_FLOWTRG BIT(28) /* Flow Control by the target. */ #define DCMD_STARTIRQEN BIT(22) /* Start Interrupt Enable */ #define DCMD_ENDIRQEN BIT(21) /* End Interrupt Enable */ +#define DCMD_FLYBYS BIT(20) /* Fly-By Source */ +#define DCMD_FLYBYT BIT(19) /* Fly-By Target */ #define DCMD_ENDIAN BIT(18) /* Device Endian-ness. */ #define DCMD_BURST8 (1 << 16) /* 8 byte burst */ #define DCMD_BURST16 (2 << 16) /* 16 byte burst */ @@ -708,11 +710,15 @@ static int mmp_pdma_control(struct dma_chan *dchan, enum dma_ctrl_cmd cmd, case DMA_SLAVE_CONFIG: if (cfg->direction == DMA_DEV_TO_MEM) { chan->dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC; + if (cfg->flags & DMA_SLAVE_FLAG_FLY_BY) + chan->dcmd |= DCMD_FLYBYT; maxburst = cfg->src_maxburst; width = cfg->src_addr_width; addr = cfg->src_addr; } else if (cfg->direction == DMA_MEM_TO_DEV) { chan->dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG; + if (cfg->flags & DMA_SLAVE_FLAG_FLY_BY) + chan->dcmd |= DCMD_FLYBYS; maxburst = cfg->dst_maxburst; width = cfg->dst_addr_width; addr = cfg->dst_addr;