Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127096
b: refs/heads/master
c: c9e0020
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Jan 7, 2009
1 parent 128bdea commit 8623ce6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51ed9ad7d239c7c10af088d1b7c5f3ee8d022f94
refs/heads/master: c9e0020d49587b1b214d65256a88a2978329aefe
16 changes: 5 additions & 11 deletions trunk/arch/blackfin/kernel/bfin_dma_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/blackfin/mach-bf561/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

#define MAX_DMA_CHANNELS 36

/* [#4267] IMDMA channels have no PERIPHERAL_MAP MMR */
#define MAX_DMA_SUSPEND_CHANNELS 32

#define CH_PPI0 0
#define CH_PPI (CH_PPI0)
#define CH_PPI1 1
Expand Down

0 comments on commit 8623ce6

Please sign in to comment.