From patchwork Thu Jul 8 13:54:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 110848 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o68DtAJL015682 for ; Thu, 8 Jul 2010 13:55:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757913Ab0GHNzE (ORCPT ); Thu, 8 Jul 2010 09:55:04 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:60371 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757859Ab0GHNzB (ORCPT ); Thu, 8 Jul 2010 09:55:01 -0400 Received: from muru.com ([72.249.23.125] helo=baageli.muru.com) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1OWrZ6-0003sI-TN; Thu, 08 Jul 2010 13:55:01 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 72.249.23.125 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19TO/Ld0bUN85OfEw8qEdbh Subject: [PATCH 09/13] omap: dma: Support for prefetch in destination synchronizedtransfer To: linux-arm-kernel@lists.infradead.org From: Tony Lindgren Cc: Samu Onkalo , linux-omap@vger.kernel.org Date: Thu, 08 Jul 2010 16:54:58 +0300 Message-ID: <20100708135458.26276.67951.stgit@baageli.muru.com> In-Reply-To: <20100708135342.26276.80936.stgit@baageli.muru.com> References: <20100708135342.26276.80936.stgit@baageli.muru.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Jul 2010 13:55:11 +0000 (UTC) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index f7f571e..ec7eddf 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -290,7 +290,7 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, val = dma_read(CCR(lch)); /* DMA_SYNCHRO_CONTROL_UPPER depends on the channel number */ - val &= ~((3 << 19) | 0x1f); + val &= ~((1 << 23) | (3 << 19) | 0x1f); val |= (dma_trigger & ~0x1f) << 14; val |= dma_trigger & 0x1f; @@ -304,11 +304,14 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count, else val &= ~(1 << 18); - if (src_or_dst_synch) + if (src_or_dst_synch == OMAP_DMA_DST_SYNC_PREFETCH) { + val &= ~(1 << 24); /* dest synch */ + val |= (1 << 23); /* Prefetch */ + } else if (src_or_dst_synch) { val |= 1 << 24; /* source synch */ - else + } else { val &= ~(1 << 24); /* dest synch */ - + } dma_write(val, CCR(lch)); } diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index 02232ca..af3a039 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h @@ -345,6 +345,7 @@ #define OMAP_DMA_SYNC_BLOCK 0x02 #define OMAP_DMA_SYNC_PACKET 0x03 +#define OMAP_DMA_DST_SYNC_PREFETCH 0x02 #define OMAP_DMA_SRC_SYNC 0x01 #define OMAP_DMA_DST_SYNC 0x00