From patchwork Tue Sep 4 12:08:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1401941 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 746053FC71 for ; Tue, 4 Sep 2012 12:08:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756869Ab2IDMIA (ORCPT ); Tue, 4 Sep 2012 08:08:00 -0400 Received: from na3sys009aog127.obsmtp.com ([74.125.149.107]:53108 "EHLO na3sys009aog127.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756818Ab2IDMH7 (ORCPT ); Tue, 4 Sep 2012 08:07:59 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob127.postini.com ([74.125.148.12]) with SMTP ID DSNKUEXvH2lckyLYEJbW1CXBaABG4BwZQtOJ@postini.com; Tue, 04 Sep 2012 05:07:59 PDT Received: by obbuo13 with SMTP id uo13so10750141obb.19 for ; Tue, 04 Sep 2012 05:07:58 -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=TmQJliCmpV8LG85BEv/IiLOzZjow/4I5yQZ8dRYQBWc=; b=opK6u/in5jgZv8iIU3VqmlgMLyEzovAi4MGkGWLHrNCKhTGeCzZs4lEHB00eTrnfYx SVZSH4ktGljtuM+LaYJAdZ0Ab5iiBPvrPF0bYM5wqx3EQfxf91FF2prZeT5yWsaakA5q HDzh6tg5Er41GQHaN0gcQcYs6P/XvR03h1a1IpvAr46SOiYHDlZMtca0fR3DVqIC3KeN SmsqMLg15ziGCwNa73RBrVb/mhZdAq0f5D0/HeeaY1RqSViCQnTm90pJ3LRaYyya2T4g IW9appNncNDIJ5OTpaLLqItEjSbMm8Ws53hsn9Ec8tXT90TpW7wNx0FNWUsdl6Ap1zg1 6NOQ== Received: by 10.60.25.193 with SMTP id e1mr15795866oeg.87.1346760478715; Tue, 04 Sep 2012 05:07:58 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id g8sm14150577obz.16.2012.09.04.05.07.56 (version=SSLv3 cipher=OTHER); Tue, 04 Sep 2012 05:07:58 -0700 (PDT) From: Peter Ujfalusi To: Russell King , Janusz Krzysztofik Cc: Liam Girdwood , Mark Brown , Jarkko Nikula , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Santosh Shilimkar Subject: [RFC update 1/2] dmaengine: omap: Support for element mode in cyclic DMA Date: Tue, 4 Sep 2012 15:08:01 +0300 Message-Id: <1346760482-12794-2-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1346760482-12794-1-git-send-email-peter.ujfalusi@ti.com> References: <1346760482-12794-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQk2pTqVMzFDOe/h9vUn6sN7tIjS/J+0ztXo3IkNteZdxXLE2mxKC2tmwfzGtWRcxgUzLopq 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 --- 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;