]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: DMA: Fix incorrect channel linking
authorJarkko Nikula <jarkko.nikula@nokia.com>
Mon, 17 Mar 2008 15:01:10 +0000 (17:01 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 9 May 2008 17:25:03 +0000 (10:25 -0700)
Function enable_lnk does incorrect channel link on non-omap1 builds if chain
is created manually with omap_request_dma and omap_dma_link_lch functions.

Fix this by making sure that next_linked_ch field is initialized to -1 just
in omap_request_dma.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/dma.c

index 793740686be278e21b7fd7c683e39280ce84d67f..c00eda588cd81b2ad87d51646a27b7ffcd577549 100644 (file)
@@ -604,6 +604,7 @@ int omap_request_dma(int dev_id, const char *dev_name,
        chan->data = data;
 #ifndef CONFIG_ARCH_OMAP1
        chan->chain_id = -1;
+       chan->next_linked_ch = -1;
 #endif
        chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;
 
@@ -1087,7 +1088,6 @@ int omap_request_dma_chain(int dev_id, const char *dev_name,
                        printk(KERN_ERR "omap_dma: Request failed %d\n", err);
                        return err;
                }
-               dma_chan[channels[i]].next_linked_ch = -1;
                dma_chan[channels[i]].prev_linked_ch = -1;
                dma_chan[channels[i]].state = DMA_CH_NOTSTARTED;