diff options
Diffstat (limited to 'arch/arm/plat-omap/dma.c')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index a46676db8113..793740686be2 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -137,7 +137,7 @@ static void omap_disable_channel_irq(int lch); | |||
137 | static inline void omap_enable_channel_irq(int lch); | 137 | static inline void omap_enable_channel_irq(int lch); |
138 | 138 | ||
139 | #define REVISIT_24XX() printk(KERN_ERR "FIXME: no %s on 24xx\n", \ | 139 | #define REVISIT_24XX() printk(KERN_ERR "FIXME: no %s on 24xx\n", \ |
140 | __FUNCTION__); | 140 | __func__); |
141 | 141 | ||
142 | #ifdef CONFIG_ARCH_OMAP15XX | 142 | #ifdef CONFIG_ARCH_OMAP15XX |
143 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ | 143 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ |
@@ -699,7 +699,7 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams) | |||
699 | u32 reg; | 699 | u32 reg; |
700 | 700 | ||
701 | if (!cpu_class_is_omap2()) { | 701 | if (!cpu_class_is_omap2()) { |
702 | printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __FUNCTION__); | 702 | printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __func__); |
703 | return; | 703 | return; |
704 | } | 704 | } |
705 | 705 | ||
@@ -1020,12 +1020,12 @@ static void create_dma_lch_chain(int lch_head, int lch_queue) | |||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | w = OMAP_DMA_CLNK_CTRL_REG(lch_head); | 1022 | w = OMAP_DMA_CLNK_CTRL_REG(lch_head); |
1023 | w &= ~(0x0f); | 1023 | w &= ~(0x1f); |
1024 | w |= lch_queue; | 1024 | w |= lch_queue; |
1025 | OMAP_DMA_CLNK_CTRL_REG(lch_head) = w; | 1025 | OMAP_DMA_CLNK_CTRL_REG(lch_head) = w; |
1026 | 1026 | ||
1027 | w = OMAP_DMA_CLNK_CTRL_REG(lch_queue); | 1027 | w = OMAP_DMA_CLNK_CTRL_REG(lch_queue); |
1028 | w &= ~(0x0f); | 1028 | w &= ~(0x1f); |
1029 | w |= (dma_chan[lch_queue].next_linked_ch); | 1029 | w |= (dma_chan[lch_queue].next_linked_ch); |
1030 | OMAP_DMA_CLNK_CTRL_REG(lch_queue) = w; | 1030 | OMAP_DMA_CLNK_CTRL_REG(lch_queue) = w; |
1031 | } | 1031 | } |
@@ -1248,7 +1248,7 @@ EXPORT_SYMBOL(omap_dma_chain_status); | |||
1248 | * @param frame_count | 1248 | * @param frame_count |
1249 | * @param callbk_data - channel callback parameter data. | 1249 | * @param callbk_data - channel callback parameter data. |
1250 | * | 1250 | * |
1251 | * @return - Success : start_dma status | 1251 | * @return - Success : 0 |
1252 | * Failure: -EINVAL/-EBUSY | 1252 | * Failure: -EINVAL/-EBUSY |
1253 | */ | 1253 | */ |
1254 | int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start, | 1254 | int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start, |
@@ -1367,7 +1367,7 @@ int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start, | |||
1367 | dma_chan[lch].flags |= OMAP_DMA_ACTIVE; | 1367 | dma_chan[lch].flags |= OMAP_DMA_ACTIVE; |
1368 | } | 1368 | } |
1369 | } | 1369 | } |
1370 | return start_dma; | 1370 | return 0; |
1371 | } | 1371 | } |
1372 | EXPORT_SYMBOL(omap_dma_chain_a_transfer); | 1372 | EXPORT_SYMBOL(omap_dma_chain_a_transfer); |
1373 | 1373 | ||
@@ -1663,6 +1663,7 @@ static int omap2_dma_handle_ch(int ch) | |||
1663 | if (!status) { | 1663 | if (!status) { |
1664 | if (printk_ratelimit()) | 1664 | if (printk_ratelimit()) |
1665 | printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", ch); | 1665 | printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", ch); |
1666 | omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0); | ||
1666 | return 0; | 1667 | return 0; |
1667 | } | 1668 | } |
1668 | if (unlikely(dma_chan[ch].dev_id == -1)) { | 1669 | if (unlikely(dma_chan[ch].dev_id == -1)) { |
@@ -1705,14 +1706,8 @@ static int omap2_dma_handle_ch(int ch) | |||
1705 | status = OMAP_DMA_CSR_REG(ch); | 1706 | status = OMAP_DMA_CSR_REG(ch); |
1706 | } | 1707 | } |
1707 | 1708 | ||
1708 | if (likely(dma_chan[ch].callback != NULL)) { | 1709 | if (likely(dma_chan[ch].callback != NULL)) |
1709 | if (dma_chan[ch].chain_id != -1) | 1710 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); |
1710 | dma_chan[ch].callback(dma_chan[ch].chain_id, status, | ||
1711 | dma_chan[ch].data); | ||
1712 | else | ||
1713 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); | ||
1714 | |||
1715 | } | ||
1716 | 1711 | ||
1717 | OMAP_DMA_CSR_REG(ch) = status; | 1712 | OMAP_DMA_CSR_REG(ch) = status; |
1718 | 1713 | ||