From patchwork Mon Oct 4 08:18:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 228041 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o948IR9U001631 for ; Mon, 4 Oct 2010 08:18:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753293Ab0JDIS1 (ORCPT ); Mon, 4 Oct 2010 04:18:27 -0400 Received: from mgw-sa02.nokia.com ([147.243.1.48]:58282 "EHLO mgw-sa02.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752818Ab0JDIS1 (ORCPT ); Mon, 4 Oct 2010 04:18:27 -0400 Received: from cseresznye.nmp.nokia.com (cseresznye.nmp.nokia.com [172.22.211.20]) by mgw-sa02.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id o948IAYZ002964; Mon, 4 Oct 2010 11:18:11 +0300 From: Peter Ujfalusi To: Tony Lindgren Cc: linux-omap@vger.kernel.org, Jarkko Nikula , linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 3/4] OMAP2: DMA: Use errata flag for disabling buffering Date: Mon, 4 Oct 2010 11:18:13 +0300 Message-Id: <1286180294-32618-4-git-send-email-peter.ujfalusi@nokia.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1286180294-32618-1-git-send-email-peter.ujfalusi@nokia.com> References: <1286180294-32618-1-git-send-email-peter.ujfalusi@nokia.com> X-Nokia-AV: Clean 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 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Oct 2010 08:18:29 +0000 (UTC) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index ae0ff64..c116c41 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -147,6 +147,7 @@ static const u8 omap1_dma_irq[OMAP1_LOGICAL_DMA_CH_COUNT] = { }; /* Errata handling */ +#define DMA_ERRATA_IFRAME_BUFFERING (1 << 0) static u16 dma_errata; #define IS_DMA_ERRATA(id) (dma_errata & (id)) @@ -1003,8 +1004,7 @@ void omap_start_dma(int lch) * Errata: On ES2.0 BUFFERING disable must be set. * This will always fail on ES1.0 */ - if (cpu_is_omap2420() || - (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0))) + if (IS_DMA_ERRATA(DMA_ERRATA_IFRAME_BUFFERING)) l |= OMAP_DMA_CCR_BUFFERING_DISABLE; l |= OMAP_DMA_CCR_EN; @@ -2048,6 +2048,9 @@ void omap_dma_global_context_restore(void) static void dma_errata_configure(void) { + if (cpu_is_omap2420() || + (cpu_is_omap2430() && (omap_type() == OMAP2430_REV_ES1_0))) + dma_errata |= DMA_ERRATA_IFRAME_BUFFERING; } static int __init omap_init_dma(void)