mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: uclinux-dist-devel@blackfin.uclinux.org
Cc: linux-kernel@vger.kernel.org,
	Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH 1/8] Blackfin: fix suspend/resume failure with some on-chip ROMs
Date: Wed, 25 Nov 2009 16:39:00 -0500	[thread overview]
Message-ID: <1259185147-31999-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1259185147-31999-1-git-send-email-vapier@gentoo.org>

From: Michael Hennerich <michael.hennerich@analog.com>

Some Blackfin on-chip ROMs utilize some MDMA channels during the suspend
and resume process, but don't clean up after themselves.  So manually
clear all DMA channels when resuming since no DMA could have been running
at this point in time.  Now Linux should be able to work regardless of any
laziness on the part of the on-chip ROM or boot loader.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 arch/blackfin/kernel/bfin_dma_5xx.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 1f17021..3946aff 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -225,8 +225,13 @@ int blackfin_dma_suspend(void)
 void blackfin_dma_resume(void)
 {
 	int i;
-	for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i)
-		dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
+
+	for (i = 0; i < MAX_DMA_CHANNELS; ++i) {
+		dma_ch[i].regs->cfg = 0;
+
+		if (i < MAX_DMA_SUSPEND_CHANNELS)
+			dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
+	}
 }
 #endif
 
-- 
1.6.5.3


  reply	other threads:[~2009-11-25 21:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 21:38 [PATCH 0/8] Blackfin fixes for 2.6.32 Mike Frysinger
2009-11-25 21:39 ` Mike Frysinger [this message]
2009-11-25 21:39 ` [PATCH 2/8] Blackfin: fix cache Kconfig typo Mike Frysinger
2009-11-25 21:39 ` [PATCH 3/8] Blackfin: update anomaly lists Mike Frysinger
2009-11-25 21:39 ` [PATCH 4/8] Blackfin: work around testset anomaly 05000477 Mike Frysinger
2009-11-25 21:39 ` [PATCH 5/8] Blackfin: check for anomaly 05000475 Mike Frysinger
2009-11-25 21:39 ` [PATCH 6/8] Blackfin: fix typo in ptrace poking Mike Frysinger
2009-11-25 21:39 ` [PATCH 7/8] Blackfin: fix memset in smp_send_reschedule() and -stop() Mike Frysinger
2009-11-25 21:39 ` [PATCH 8/8] Blackfin: fix SMP build error in start_thread() Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1259185147-31999-2-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®