Commit 377d43e7 authored by Michael Hennerich's avatar Michael Hennerich Committed by Bryan Wu

Blackfin arch: fix bug - IMDMA is not type struct dma_register

TEMP Workaround - avoid access to PERIPHERAL_MAP
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent b1b154e5
...@@ -477,7 +477,11 @@ int blackfin_dma_suspend(void) ...@@ -477,7 +477,11 @@ int blackfin_dma_suspend(void)
{ {
int i; int i;
#ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */
for (i = 0; i <= CH_MEM_STREAM3_SRC; i++) {
#else
for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) { for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) {
#endif
if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) { if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) {
printk(KERN_ERR "DMA Channel %d failed to suspend\n", i); printk(KERN_ERR "DMA Channel %d failed to suspend\n", i);
return -EBUSY; return -EBUSY;
...@@ -493,7 +497,11 @@ void blackfin_dma_resume(void) ...@@ -493,7 +497,11 @@ void blackfin_dma_resume(void)
{ {
int i; int i;
#ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */
for (i = 0; i <= CH_MEM_STREAM3_SRC; i++)
#else
for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++) for (i = 0; i < MAX_BLACKFIN_DMA_CHANNEL; i++)
#endif
dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment