Commit 0692f05d authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Tony Lindgren

ARM: OMAP: DMA: Fix incorrect channel linking

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: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7cf95774
...@@ -604,6 +604,7 @@ int omap_request_dma(int dev_id, const char *dev_name, ...@@ -604,6 +604,7 @@ int omap_request_dma(int dev_id, const char *dev_name,
chan->data = data; chan->data = data;
#ifndef CONFIG_ARCH_OMAP1 #ifndef CONFIG_ARCH_OMAP1
chan->chain_id = -1; chan->chain_id = -1;
chan->next_linked_ch = -1;
#endif #endif
chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ; 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, ...@@ -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); printk(KERN_ERR "omap_dma: Request failed %d\n", err);
return err; return err;
} }
dma_chan[channels[i]].next_linked_ch = -1;
dma_chan[channels[i]].prev_linked_ch = -1; dma_chan[channels[i]].prev_linked_ch = -1;
dma_chan[channels[i]].state = DMA_CH_NOTSTARTED; dma_chan[channels[i]].state = DMA_CH_NOTSTARTED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment