On Tue, Apr 02, 2013 at 12:44:36PM +0200, Lars-Peter Clausen wrote: > On 04/02/2013 11:12 AM, PADMAVATHI VENNA wrote: > >> Use the generic of_dma_xlate_by_chan_id xlate callback instead of a custom > >> implementation. Hi Padma,
Can you please fix your MUA to 1) not break the message ids 2) reply inline which makes a distinction for quoted text > >> > >> There is one minor difference between the generic of_dma_xlate_by_chan_id > >> function and the pl330 specific one. of_dma_xlate_by_chan_id only sets the > >> DMA_SLAVE capability for the channel capability mask, while the pl330 > >> driver > >> additionally sets the DMA_CYCLIC capability. But since all pl330 channels > >> which > >> have the DMA_SLAVE capability set also have DMA_CYCLIC capability set both > >> functions will have the same result. > >> > >> I am not clear about the dma capabilities. Is it mentioned some where that > >> if we set DMA_SLAVE capability > >> will that also set DMA_CYCLIC capability? > >> > > > > Well DMA_SLAVE won't automatically set DMA_CYCLIC. But the driver sets both. > > > > I tested your patches, it's woking for audio. But I need some clarification > > related to capabilities. > > As per my understanding, controller driver registers the available > > capabilities in the probe and > > client drivers requests for a particular capability. In both the cases, in > > the dmaengine it checks > > if the requested capability is satisfied. > > If we don't set the DMA_CYCLIC, how __dma_device_satisfies_mask works? > > > > Please correct me if I am wrong. > > > > Thanks > > Padma > > Hi, > > Well, DMA_SLAVE | DMA_CYCLIC is a more restrictive mask than DMA_SLAVE. So > any channel that matches DMA_SLAVE | DMA_CYCLIC will also match DMA_SLAVE. DMA_SLAVE means that controllers channel can do slave transactions and should support the slave APIs. DMA_CYCLIC means that controller can do a cyclic transfers for the sg list sent and will do so untill channel is aborted Now we are talking about DMA_CYCLIC for periphrals only so DMA_SLAVE cna be implied and is usually the normal usage though nothing prevent you from doing a cyclic memcpy if you would wish. Right thing would be to set mask aptly on both sides, and since you are doing DMA_CYCLIC, i would expect both the controller and client have done this, if not we need this to be fixed :) -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/