aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/blackfin/kernel/bfin_dma_5xx.c26
-rw-r--r--arch/blackfin/mach-bf548/dma.c1
-rw-r--r--include/asm-blackfin/dma.h7
-rw-r--r--include/asm-blackfin/mach-bf548/defBF549.h2
-rw-r--r--include/asm-blackfin/mach-bf548/defBF54x_base.h2
-rw-r--r--include/asm-blackfin/mach-bf548/dma.h2
6 files changed, 34 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c
index e19164fb4cd1..503eef4c7fec 100644
--- a/arch/blackfin/kernel/bfin_dma_5xx.c
+++ b/arch/blackfin/kernel/bfin_dma_5xx.c
@@ -420,6 +420,32 @@ unsigned short get_dma_curr_ycount(unsigned int channel)
420} 420}
421EXPORT_SYMBOL(get_dma_curr_ycount); 421EXPORT_SYMBOL(get_dma_curr_ycount);
422 422
423unsigned long get_dma_next_desc_ptr(unsigned int channel)
424{
425 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
426 && channel < MAX_BLACKFIN_DMA_CHANNEL));
427
428 return dma_ch[channel].regs->next_desc_ptr;
429}
430EXPORT_SYMBOL(get_dma_next_desc_ptr);
431
432unsigned long get_dma_curr_desc_ptr(unsigned int channel)
433{
434 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
435 && channel < MAX_BLACKFIN_DMA_CHANNEL));
436
437 return dma_ch[channel].regs->curr_desc_ptr;
438}
439
440unsigned long get_dma_curr_addr(unsigned int channel)
441{
442 BUG_ON(!(dma_ch[channel].chan_status != DMA_CHANNEL_FREE
443 && channel < MAX_BLACKFIN_DMA_CHANNEL));
444
445 return dma_ch[channel].regs->curr_addr_ptr;
446}
447EXPORT_SYMBOL(get_dma_curr_addr);
448
423static void *__dma_memcpy(void *dest, const void *src, size_t size) 449static void *__dma_memcpy(void *dest, const void *src, size_t size)
424{ 450{
425 int direction; /* 1 - address decrease, 0 - address increase */ 451 int direction; /* 1 - address decrease, 0 - address increase */
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
index a8184113be48..957bf1366eff 100644
--- a/arch/blackfin/mach-bf548/dma.c
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -64,6 +64,7 @@
64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR, 64 (struct dma_register *) MDMA_D3_NEXT_DESC_PTR,
65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR, 65 (struct dma_register *) MDMA_S3_NEXT_DESC_PTR,
66}; 66};
67EXPORT_SYMBOL(base_addr);
67 68
68int channel2irq(unsigned int channel) 69int channel2irq(unsigned int channel)
69{ 70{
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h
index b42a531e7a1b..b469505af364 100644
--- a/include/asm-blackfin/dma.h
+++ b/include/asm-blackfin/dma.h
@@ -109,9 +109,7 @@ struct dma_register {
109 109
110 unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer 110 unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer
111 register */ 111 register */
112 unsigned short curr_addr_ptr_lo; /* DMA Current Address Pointer 112 unsigned long curr_addr_ptr; /* DMA Current Address Pointer
113 register */
114 unsigned short curr_addr_ptr_hi; /* DMA Current Address Pointer
115 register */ 113 register */
116 unsigned short irq_status; /* DMA irq status register */ 114 unsigned short irq_status; /* DMA irq status register */
117 unsigned short dummy6; 115 unsigned short dummy6;
@@ -166,6 +164,9 @@ void set_dma_curr_addr(unsigned int channel, unsigned long addr);
166unsigned short get_dma_curr_irqstat(unsigned int channel); 164unsigned short get_dma_curr_irqstat(unsigned int channel);
167unsigned short get_dma_curr_xcount(unsigned int channel); 165unsigned short get_dma_curr_xcount(unsigned int channel);
168unsigned short get_dma_curr_ycount(unsigned int channel); 166unsigned short get_dma_curr_ycount(unsigned int channel);
167unsigned long get_dma_next_desc_ptr(unsigned int channel);
168unsigned long get_dma_curr_desc_ptr(unsigned int channel);
169unsigned long get_dma_curr_addr(unsigned int channel);
169 170
170/* set large DMA mode descriptor */ 171/* set large DMA mode descriptor */
171void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg); 172void set_dma_sg(unsigned int channel, struct dmasg *sg, int nr_sg);
diff --git a/include/asm-blackfin/mach-bf548/defBF549.h b/include/asm-blackfin/mach-bf548/defBF549.h
index 50b3fe55ef0c..4e46d657e50e 100644
--- a/include/asm-blackfin/mach-bf548/defBF549.h
+++ b/include/asm-blackfin/mach-bf548/defBF549.h
@@ -1178,7 +1178,7 @@
1178 1178
1179/* Bit masks for HOST_STATUS */ 1179/* Bit masks for HOST_STATUS */
1180 1180
1181#define READY 0x1 /* DMA Ready */ 1181#define DMA_READY 0x1 /* DMA Ready */
1182#define FIFOFULL 0x2 /* FIFO Full */ 1182#define FIFOFULL 0x2 /* FIFO Full */
1183#define FIFOEMPTY 0x4 /* FIFO Empty */ 1183#define FIFOEMPTY 0x4 /* FIFO Empty */
1184#define DMA_COMPLETE 0x8 /* DMA Complete */ 1184#define DMA_COMPLETE 0x8 /* DMA Complete */
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h
index d40db5cc5d5f..1d365c844ffe 100644
--- a/include/asm-blackfin/mach-bf548/defBF54x_base.h
+++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h
@@ -3303,7 +3303,7 @@
3303 3303
3304#define MFD 0xf000 /* Multi channel Frame Delay */ 3304#define MFD 0xf000 /* Multi channel Frame Delay */
3305#define FSDR 0x80 /* Frame Sync to Data Relationship */ 3305#define FSDR 0x80 /* Frame Sync to Data Relationship */
3306#define MCMEM 0x10 /* Multi channel Frame Mode Enable */ 3306#define MCMEN 0x10 /* Multi channel Frame Mode Enable */
3307#define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */ 3307#define MCDRXPE 0x8 /* Multi channel DMA Receive Packing */
3308#define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */ 3308#define MCDTXPE 0x4 /* Multi channel DMA Transmit Packing */
3309#define MCCRM 0x3 /* 2X Clock Recovery Mode */ 3309#define MCCRM 0x3 /* 2X Clock Recovery Mode */
diff --git a/include/asm-blackfin/mach-bf548/dma.h b/include/asm-blackfin/mach-bf548/dma.h
index 14cb10cc24ae..4d97d3aa97cd 100644
--- a/include/asm-blackfin/mach-bf548/dma.h
+++ b/include/asm-blackfin/mach-bf548/dma.h
@@ -70,5 +70,5 @@
70#define MAX_BLACKFIN_DMA_CHANNEL 32 70#define MAX_BLACKFIN_DMA_CHANNEL 32
71 71
72extern int channel2irq(unsigned int channel); 72extern int channel2irq(unsigned int channel);
73extern struct dma_register *base_addr[]; 73extern struct dma_register *base_addr[MAX_BLACKFIN_DMA_CHANNEL];
74#endif 74#endif