From patchwork Wed May 20 13:58:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koskinen, Aaro (Nokia - FI/Espoo)" X-Patchwork-Id: 24993 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4KDxsCE005286 for ; Wed, 20 May 2009 13:59:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811AbZETN6x (ORCPT ); Wed, 20 May 2009 09:58:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753013AbZETN6x (ORCPT ); Wed, 20 May 2009 09:58:53 -0400 Received: from smtp.nokia.com ([192.100.105.134]:60799 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755106AbZETN6x (ORCPT ); Wed, 20 May 2009 09:58:53 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4KDwagq023152; Wed, 20 May 2009 08:58:52 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 May 2009 16:58:32 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 May 2009 16:58:31 +0300 Received: from localhost.localdomain (esdhcp043221.research.nokia.com [172.21.43.221]) by mgw-sa01.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n4KDwUqf017453; Wed, 20 May 2009 16:58:31 +0300 From: Aaro Koskinen To: khilman@deeprootsystems.com, linux-omap@vger.kernel.org Subject: [PATCH] OMAP: PM: Clear DMA channel state after a wakeup Date: Wed, 20 May 2009 16:58:30 +0300 Message-Id: <1242827910-16136-1-git-send-email-aaro.koskinen@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <> References: <> X-OriginalArrivalTime: 20 May 2009 13:58:31.0792 (UTC) FILETIME=[0F3CB700:01C9D953] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Clear DMA channel states so that users can assume a known initial state. Signed-off-by: Aaro Koskinen --- arch/arm/plat-omap/dma.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 9796773..cd53b28 100755 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2322,6 +2322,8 @@ EXPORT_SYMBOL(omap_dma_global_context_save); void omap_dma_global_context_restore(void) { + int ch; + dma_write(omap_dma_global_context.dma_gcr, GCR); dma_write(omap_dma_global_context.dma_ocp_sysconfig, OCP_SYSCONFIG); @@ -2336,6 +2338,10 @@ void omap_dma_global_context_restore(void) */ if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP)) dma_write(0x3 , IRQSTATUS_L0); + + for (ch = 0; ch < dma_chan_count; ch++) + if (dma_chan[ch].dev_id != -1) + omap_clear_dma(ch); } EXPORT_SYMBOL(omap_dma_global_context_restore);