From: Janusz Krzysztofik Date: Sun, 23 Aug 2009 15:56:12 +0000 (+0200) Subject: ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510 X-Git-Tag: Ubuntu-5.2.0-15.16~26532^2~149 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9f0f4ae570a148c76be6e86c959c8d4ed912fb1f;p=mirror_ubuntu-eoan-kernel.git ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510 Implement DMA channel self linking on OMAP1510 using AUTO_INIT and REPEAT flags of the DMA CCR register. Created against linux-2.6.31-rc5. Tested on Amstrad Delta. Signed-off-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Mark Brown --- diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index def14ec265b3..da4cc5288db0 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1125,6 +1125,11 @@ int omap_dma_running(void) void omap_dma_link_lch(int lch_head, int lch_queue) { if (omap_dma_in_1510_mode()) { + if (lch_head == lch_queue) { + dma_write(dma_read(CCR(lch_head)) | (3 << 8), + CCR(lch_head)); + return; + } printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); BUG(); return; @@ -1147,6 +1152,11 @@ EXPORT_SYMBOL(omap_dma_link_lch); void omap_dma_unlink_lch(int lch_head, int lch_queue) { if (omap_dma_in_1510_mode()) { + if (lch_head == lch_queue) { + dma_write(dma_read(CCR(lch_head)) & ~(3 << 8), + CCR(lch_head)); + return; + } printk(KERN_ERR "DMA linking is not supported in 1510 mode\n"); BUG(); return;