diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2009-01-07 23:14:39 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 23:14:39 +0800 |
commit | c9e0020d49587b1b214d65256a88a2978329aefe (patch) | |
tree | 82fff5a8c9ece4e8c97a07bbad42bb57221f803c /arch/blackfin/kernel/bfin_dma_5xx.c | |
parent | 51ed9ad7d239c7c10af088d1b7c5f3ee8d022f94 (diff) | |
download | op-kernel-dev-c9e0020d49587b1b214d65256a88a2978329aefe.zip op-kernel-dev-c9e0020d49587b1b214d65256a88a2978329aefe.tar.gz |
Blackfin arch: push bf561 PERIPHERAL_MAP oddity into bf561-specific code
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/bfin_dma_5xx.c')
-rw-r--r-- | arch/blackfin/kernel/bfin_dma_5xx.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 1882fd8..36f78c1 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c @@ -411,15 +411,14 @@ unsigned long get_dma_curr_addr(unsigned int channel) EXPORT_SYMBOL(get_dma_curr_addr); #ifdef CONFIG_PM +# ifndef MAX_DMA_SUSPEND_CHANNELS +# define MAX_DMA_SUSPEND_CHANNELS MAX_DMA_CHANNELS +# endif 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_DMA_CHANNELS; i++) { -#endif + for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i) { if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) { printk(KERN_ERR "DMA Channel %d failed to suspend\n", i); return -EBUSY; @@ -434,12 +433,7 @@ int blackfin_dma_suspend(void) 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_DMA_CHANNELS; i++) -#endif + for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i) dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; } #endif |