]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: fix bug - IMDMA is not type struct dma_register
authorMichael Hennerich <michael.hennerich@analog.com>
Sat, 26 Jul 2008 10:28:03 +0000 (18:28 +0800)
committerBryan Wu <cooloney@kernel.org>
Sat, 26 Jul 2008 10:28:03 +0000 (18:28 +0800)
TEMP Workaround - avoid access to PERIPHERAL_MAP

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/kernel/bfin_dma_5xx.c

index ad0e75845ac2b4b6b056b8362a4cb655aa81690e..93229b3d6e3e30da6bc17dd760bd48ddbacda0af 100644 (file)
@@ -477,7 +477,11 @@ int blackfin_dma_suspend(void)
 {
        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++) {
+#endif
                if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) {
                        printk(KERN_ERR "DMA Channel %d failed to suspend\n", i);
                        return -EBUSY;
@@ -493,7 +497,11 @@ void blackfin_dma_resume(void)
 {
        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++)
+#endif
                dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
 }
 #endif