From patchwork Thu Oct 22 23:09:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 55492 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 n9MNBYbe019598 for ; Thu, 22 Oct 2009 23:11:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755549AbZJVXLL (ORCPT ); Thu, 22 Oct 2009 19:11:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755550AbZJVXLJ (ORCPT ); Thu, 22 Oct 2009 19:11:09 -0400 Received: from mail-qy0-f194.google.com ([209.85.221.194]:37878 "EHLO mail-qy0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755549AbZJVXLG (ORCPT ); Thu, 22 Oct 2009 19:11:06 -0400 Received: by mail-qy0-f194.google.com with SMTP id 32so5544712qyk.4 for ; Thu, 22 Oct 2009 16:11:10 -0700 (PDT) Received: by 10.224.12.15 with SMTP id v15mr5018588qav.187.1256253070876; Thu, 22 Oct 2009 16:11:10 -0700 (PDT) Received: from localhost ([216.254.16.51]) by mx.google.com with ESMTPS id 2sm6590176qwi.32.2009.10.22.16.11.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Oct 2009 16:11:10 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Aaro Koskinen Subject: [PATCH v2 20/32] OMAP: PM: Clear DMA channel state after a wakeup Date: Thu, 22 Oct 2009 16:09:41 -0700 Message-Id: <1256252993-24328-21-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.6.4.3 In-Reply-To: <1256252993-24328-20-git-send-email-khilman@deeprootsystems.com> References: <1256252993-24328-1-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-2-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-3-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-4-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-5-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-6-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-7-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-8-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-9-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-10-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-11-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-12-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-13-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-14-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-15-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-16-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-17-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-18-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-19-git-send-email-khilman@deeprootsystems.com> <1256252993-24328-20-git-send-email-khilman@deeprootsystems.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 3b91fd3..f716234 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2359,6 +2359,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); @@ -2373,6 +2375,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);