On Thu, Jan 15, 2015 at 11:25:11AM +0530, Mayuresh Chitale wrote: > On Tue, Jan 13, 2015 at 11:28 PM, Vinod Koul <vinod.koul@xxxxxxxxx> wrote: > > On Fri, Jan 02, 2015 at 05:01:42PM +0530, Mayuresh Chitale wrote: > > > > 1st things stop TOP posting, this is not good email etiquette... > > > >> The DMA engine is actually a part of a PCI root complex and uses > >> memory mapped FIFOs for both sides i.e AXI and PCI and we need to > >> program memory mapped queues for both AXI side and PCI side. Its > >> possible that there could be multiple elements from AXI side that need > >> to be transferred to multiple elements to PCI side or vice-versa > >> provided that the total length on both sides is equal. I see there is > >> the device_prep_dma_sg api but it appears to me that is only intended > >> to be used for async operations. Is that correct? > > the FIFO will have constant address or will it increment/decrement? > > Actually the queues are descriptor queues only. We have to provide to > hardware information about source, destination and status queues which > are initialized during probe. Each element of source/destination queue > contains information about the actual address and some other > attributes. The source/destination address can be in either PCI or AXI > address. In this case dmaengine APIs are expected to program elements > with proper address etc. I would describe it as a special case of > mem2mem transfer between Host DDR and PCI address space. > > Is it ok in this case to support memcpy and sg apis? However this > device cannot be used for these operations between two memory > locations on the same host. Besides I would also need to know > direction to determine whether source/destination address points to > PCI or AXI location. In normal mem2mem transfers there is no use for > direction. Then I would argue that this is not slave transfer. Seems more of a memcpy mode. Also since device doesn't support data copy over same host, you cna return error if you detect this -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html