Alternate driver for Avalon-MM DMA for PCIe

Hi All,

If anyone is interested in a Linux device driver for Avalon-MM DMA for PCIe? The existing reference design code is quite difficult to maintain, while the alternate solution basically boils down to these APIs:

typedef void (*avalon_dma_xfer_callback)(void *dma_async_param);
 
int avalon_dma_submit_xfer(
	struct avalon_dma *avalon_dma,
	enum dma_data_direction direction,
	dma_addr_t dev_addr,
	dma_addr_t host_addr,
	unsigned int size,
	avalon_dma_xfer_callback callback,
	void *callback_param);
 
int avalon_dma_submit_xfer_sg(
	struct avalon_dma *avalon_dma,
	enum dma_data_direction direction,
	dma_addr_t dev_addr,
	struct sg_table *sg_table,
	avalon_dma_xfer_callback callback,
  	void *callback_param);
 
int avalon_dma_issue_pending(struct avalon_dma *avalon_dma);

The callbacks are called from the tasklet context - much like standard Linux dmaengine framework does.

If the idea gathers enough interest I can think of posting it upstream or coming up with implementation that conforms to the Kernel dmaengine model.

Please, let me know if the use of suggested API is not clear and needs clarification.

Thanks!