/* Configure one DMA channel using the configuration structure */
int XAxiVdma_DmaConfig(XAxiVdma *InstancePtr, u16 Direction, XAxiVdma_DmaSetup *DmaConfigPtr)
/* Configure one DMA channel using the configuration structure */
int XAxiVdma_DmaConfig(XAxiVdma *InstancePtr, u16 Direction, XAxiVdma_DmaSetup *DmaConfigPtr)
{
	XAxiVdma_Channel *Channel;
	Channel = XAxiVdma_GetChannel(InstancePtr, Direction);
	if (!Channel) {
		return XST_INVALID_PARAM;
	}
	if (Channel->IsValid) {
		return XAxiVdma_ChannelConfig(Channel,
		    (XAxiVdma_ChannelSetup *)DmaConfigPtr);
	}
	else {
		return XST_DEVICE_NOT_FOUND;
	}
}