From patchwork Wed Sep 12 11:46:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1443111 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 D1E8FDF28C for ; Wed, 12 Sep 2012 11:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754439Ab2ILLqr (ORCPT ); Wed, 12 Sep 2012 07:46:47 -0400 Received: from na3sys009aog125.obsmtp.com ([74.125.149.153]:39010 "EHLO na3sys009aog125.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754054Ab2ILLqo (ORCPT ); Wed, 12 Sep 2012 07:46:44 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKUFB2I5NOmd1lGIXbu1YSs6DMaZbGY08P@postini.com; Wed, 12 Sep 2012 04:46:44 PDT Received: by obbuo13 with SMTP id uo13so2442096obb.19 for ; Wed, 12 Sep 2012 04:46:43 -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=WT36B/82VX9+j8sFJBfKv2sifpypqTt49MsuelVHtOyqdfhb4QshIeHQis8Wo8i+qG SXixHHC/YaMAiWhcu6v8hq98HxiEWBGH2u3uUIc5sz5Z9jy2bgAY5L+TaagdwjDyfb9C Y/lKOSrVxvRu0CJCKWzjs1bkeIg3vFxpLFWo7GEheBi3Ei+6kA44HsSfk6WifmYXS0cK ZBetzIa10B8d/3cefu86YaJ2vFejZWpUHTB0AC0gyyOIwiy637OyzzWOBj++0L039rEe eYUnidjrf55uCUeqJqS4vVtpGF1Zu8oq65QOONFQ77R+MEM6fPD/y4FC7uislvrLjQSb GrtQ== Received: by 10.60.19.37 with SMTP id b5mr22405057oee.16.1347450403460; Wed, 12 Sep 2012 04:46:43 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id c6sm19835570obd.22.2012.09.12.04.46.40 (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:46:42 -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 Subject: [PATCH 01/11] dmaengine: omap: Support for element mode in cyclic DMA Date: Wed, 12 Sep 2012 14:46:57 +0300 Message-Id: <1347450427-27627-2-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1347450427-27627-1-git-send-email-peter.ujfalusi@ti.com> References: <1347450427-27627-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQloRTwR/UniCJKcj5CPkpK4pO1HMZFAstsqvIOtl5klnYYMcC8aDCGM5/1PZW/Hxqr41uIn 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;