Hi, * Shilimkar, Santosh <[email protected]> [081216 14:05]: > Tony, > Here is the patch for DMA to ease the chaining usage. OMAP mcbsp drivers > makes use of this chaining feature but it's not pushed on mainline yet. It's > available on zoom tree. Link for the same driver. > http://git.omapzoom.org/?p=omapkernel.git;a=blob;f=arch/arm/mach-omap2/mcbsp.c;h=ce726c5d27eedb678ad3f981e2f5e08134e44e27;hb=2af15d1d7931a7c928d84057ed4494b77769de12
Hmm, the omap2_mcbsp_rx_dma_callback() and omap2_mcbsp_tx_dma_callback() don't even use the lch parameter passed to them in the example above. And can't you just use the data->chain_id to get the chain in the callback function? Tony > > > From: Santosh Shilimkar <[email protected]> > > This patch reverts back the change done on OMAP dma library. It corrects the > chaining callback and reduces the complexity for the DMA users in chaining. > So with this patch, drivers making use of OMAP DMA chaining feature need not > built any intelligence for chain related transfers in their callback using > private data. > > Signed-off-by: Santosh Shilimkar <[email protected]> > Acked By : Nishant kamat <[email protected]> > --- > --- omapkernel.orig/arch/arm/plat-omap/dma.c 2008-12-04 11:11:07.000000000 > +0530 > +++ omapkernel/arch/arm/plat-omap/dma.c 2008-12-16 16:59:42.066118383 > +0530 > @@ -1936,7 +1936,11 @@ static int omap2_dma_handle_ch(int ch) > } > > if (likely(dma_chan[ch].callback != NULL)) > - dma_chan[ch].callback(ch, status, dma_chan[ch].data); > + if (dma_chan[ch].chain_id != -1) > + dma_chan[ch].callback(dma_chan[ch].chain_id, status, > + dma_chan[ch].data); > + else > + dma_chan[ch].callback(ch, status, dma_chan[ch].data); > > dma_write(status, CSR(ch)); -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
