aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commitc9e0020d49587b1b214d65256a88a2978329aefe (patch)
tree82fff5a8c9ece4e8c97a07bbad42bb57221f803c /arch/blackfin
parent51ed9ad7d239c7c10af088d1b7c5f3ee8d022f94 (diff)
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')
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c16
-rw-r--r--arch/blackfin/mach-bf561/include/mach/dma.h3
2 files changed, 8 insertions, 11 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index 1882fd82879b..36f78c1648b9 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)
411EXPORT_SYMBOL(get_dma_curr_addr); 411EXPORT_SYMBOL(get_dma_curr_addr);
412 412
413#ifdef CONFIG_PM 413#ifdef CONFIG_PM
414# ifndef MAX_DMA_SUSPEND_CHANNELS
415# define MAX_DMA_SUSPEND_CHANNELS MAX_DMA_CHANNELS
416# endif
414int blackfin_dma_suspend(void) 417int blackfin_dma_suspend(void)
415{ 418{
416 int i; 419 int i;
417 420
418#ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */ 421 for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i) {
419 for (i = 0; i <= CH_MEM_STREAM3_SRC; i++) {
420#else
421 for (i = 0; i < MAX_DMA_CHANNELS; i++) {
422#endif
423 if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) { 422 if (dma_ch[i].chan_status == DMA_CHANNEL_ENABLED) {
424 printk(KERN_ERR "DMA Channel %d failed to suspend\n", i); 423 printk(KERN_ERR "DMA Channel %d failed to suspend\n", i);
425 return -EBUSY; 424 return -EBUSY;
@@ -434,12 +433,7 @@ int blackfin_dma_suspend(void)
434void blackfin_dma_resume(void) 433void blackfin_dma_resume(void)
435{ 434{
436 int i; 435 int i;
437 436 for (i = 0; i < MAX_DMA_SUSPEND_CHANNELS; ++i)
438#ifdef CONFIG_BF561 /* IMDMA channels doesn't have a PERIPHERAL_MAP */
439 for (i = 0; i <= CH_MEM_STREAM3_SRC; i++)
440#else
441 for (i = 0; i < MAX_DMA_CHANNELS; i++)
442#endif
443 dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map; 437 dma_ch[i].regs->peripheral_map = dma_ch[i].saved_peripheral_map;
444} 438}
445#endif 439#endif
diff --git a/arch/blackfin/mach-bf561/include/mach/dma.h b/arch/blackfin/mach-bf561/include/mach/dma.h
index 2597a09a012c..13647c71f1c7 100644
--- a/arch/blackfin/mach-bf561/include/mach/dma.h
+++ b/arch/blackfin/mach-bf561/include/mach/dma.h
@@ -10,6 +10,9 @@
10 10
11#define MAX_DMA_CHANNELS 36 11#define MAX_DMA_CHANNELS 36
12 12
13/* [#4267] IMDMA channels have no PERIPHERAL_MAP MMR */
14#define MAX_DMA_SUSPEND_CHANNELS 32
15
13#define CH_PPI0 0 16#define CH_PPI0 0
14#define CH_PPI (CH_PPI0) 17#define CH_PPI (CH_PPI0)
15#define CH_PPI1 1 18#define CH_PPI1 1