diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-10-20 09:38:04 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-11-25 02:35:33 -0500 |
commit | 865bddfbf70d9ba04638c15ef49f17b599d9bbf3 (patch) | |
tree | 32390bee517934693940b5c502f3d241bbb3b770 /arch/blackfin | |
parent | a8a8a669ea13d792296737505adc43ccacf3a648 (diff) |
Blackfin: fix suspend/resume failure with some on-chip ROMs
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>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | 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 1f170216d2f9..3946aff4f414 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) | |||
225 | void blackfin_dma_resume(void) | 225 | void blackfin_dma_resume(void) |
226 | { | 226 | { |
227 | int i; | 227 | int i; |
228 | for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i) | 228 | |
229 | dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; | 229 | for (i = 0; i < MAX_DMA_CHANNELS; ++i) { |
230 | dma_ch[i].regs->cfg = 0; | ||
231 | |||
232 | if (i < MAX_DMA_SUSPEND_CHANNELS) | ||
233 | dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; | ||
234 | } | ||
230 | } | 235 | } |
231 | #endif | 236 | #endif |
232 | 237 | ||