From patchwork Thu Sep 13 13:37:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1452361 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9632DDF24C for ; Thu, 13 Sep 2012 13:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189Ab2IMNhm (ORCPT ); Thu, 13 Sep 2012 09:37:42 -0400 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:56209 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751750Ab2IMNhk (ORCPT ); Thu, 13 Sep 2012 09:37:40 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKUFHhpKlgRIehp+bB6s3Fd8wHAeZ1g2fB@postini.com; Thu, 13 Sep 2012 06:37:40 PDT Received: by obbuo13 with SMTP id uo13so4468378obb.19 for ; Thu, 13 Sep 2012 06:37:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ClQASDA/G46mlWGwliM8TrpT9WDK8pDOxTcYQ55IgwQ=; b=eZmihab/73WKC7zH7mV7vYaTtdMz4rKlZljs6Usqk/hS44dO6ut++lW44X1MLp5Hw9 4uC193U51XHMdZQviABP8FjzRDEFY4ofSOz3lsgbWMwPEk43fDpOeYGukMVwynHzdi/C 7GvQ/8x2tqcKZrJv2r2V0jM3B8kSdOz2FQE2VSfj+oMn3WvE7JCyZjC6m8o/0tvo/nRs JM3vb2MFFlDBPR/amgKbBZn5QN1EOiMvbY8tnSpbf44x1yEXnCAZhhn7NVVYPCfNwoCb HUEqaHHVyJhNpI8UsyRZzJWIpX1Tx3JbbEE5xg70nUC1KfPAYr0N7xuZ7mQVsDgmXbMD H88w== Received: by 10.60.0.169 with SMTP id 9mr2255656oef.94.1347543459720; Thu, 13 Sep 2012 06:37:39 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id n8sm19403567oec.5.2012.09.13.06.37.36 (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 06:37:39 -0700 (PDT) From: Peter Ujfalusi To: Mark Brown , Liam Girdwood , Tony Lindgren , Russell King , Vinod Koul , Dan Williams , Jarkko Nikula Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik , Ricardo Neri , Lars-Peter Clausen Subject: [PATCH v2 01/15] dmaengine: omap: Support for element mode in cyclic DMA Date: Thu, 13 Sep 2012 16:37:51 +0300 Message-Id: <1347543485-339-2-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQlJmykFA05FVNmEA/nZMsd69LIPMPpwnROxQmW8jea3A+KcC8+iykzNdCqARccfj0D4FfZK Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When src_maxburst/dst_maxburst is set to 0 by the users of cyclic DMA (mostly audio) indicates that we should configure the omap DMA to element sync mode instead of packet mode. Signed-off-by: Peter Ujfalusi CC: Russell King --- drivers/dma/omap-dma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index ae05618..b77a40d 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -413,7 +413,10 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic( d->dev_addr = dev_addr; d->fi = burst; d->es = es; - d->sync_mode = OMAP_DMA_SYNC_PACKET; + if (burst) + d->sync_mode = OMAP_DMA_SYNC_PACKET; + else + d->sync_mode = OMAP_DMA_SYNC_ELEMENT; d->sync_type = sync_type; d->periph_port = OMAP_DMA_PORT_MPUI; d->sg[0].addr = buf_addr;