lib/sw_apps/zynqmp_fsbl/src/xfsbl_csu_dma.c
u32 XFsbl_CsuDmaInit(XCsuDma* CsuDmaPtr)
{
	u32 Status;
	s32 SStatus;
	XCsuDma_Config * CsuDmaConfig;

	if (CsuDmaPtr == NULL) {
		CsuDmaPtr = &CsuDma;
	}

	(void)memset(CsuDmaPtr, 0, sizeof(XCsuDma));

	CsuDmaConfig = XCsuDma_LookupConfig(0);
	if (NULL == CsuDmaConfig) {
		XFsbl_Printf(DEBUG_GENERAL, "XFSBL_ERROR_CSUDMA_INIT_FAIL \n\r");
		Status = XFSBL_ERROR_CSUDMA_INIT_FAIL;
		goto END;
	}

	SStatus = XCsuDma_CfgInitialize(CsuDmaPtr, CsuDmaConfig,
			CsuDmaConfig->BaseAddress);
	if (SStatus != XFSBL_SUCCESS) {
		XFsbl_Printf(DEBUG_GENERAL, "XFSBL_ERROR_CSUDMA_INIT_FAIL \n\r");
		Status = XFSBL_ERROR_CSUDMA_INIT_FAIL;
		goto END;
	}
	Status = XFSBL_SUCCESS;
END:
	return Status;
}
/*****************************************************************************/
/**
 * This function is used to initialize the DMA driver
 *
 * @param	CsuDmaPtr is pointer to XCsuDma instance
 *
 * @return	returns the error codes described in xfsbl_error.h on any error
 * 		returns XFSBL_SUCCESS on success
 *
 *****************************************************************************/
This function is used to initialize the DMA driver
@param       CsuDmaPtr is pointer to XCsuDma instance

@return      returns the error codes described in xfsbl_error.h on any error
returns XFSBL_SUCCESS on success
This function is used to initialize the DMA driver @param CsuDmaPtr is pointer to XCsuDma instance @return returns the error codes described in xfsbl_error . h on any error returns XFSBL_SUCCESS on success
u32 XFsbl_CsuDmaInit(XCsuDma* CsuDmaPtr)
{
	u32 Status;
	s32 SStatus;
	XCsuDma_Config * CsuDmaConfig;
	if (CsuDmaPtr == NULL) {
		CsuDmaPtr = &CsuDma;
	}
	(void)memset(CsuDmaPtr, 0, sizeof(XCsuDma));
	CsuDmaConfig = XCsuDma_LookupConfig(0);
	if (NULL == CsuDmaConfig) {
		XFsbl_Printf(DEBUG_GENERAL, "XFSBL_ERROR_CSUDMA_INIT_FAIL \n\r");
		Status = XFSBL_ERROR_CSUDMA_INIT_FAIL;
		goto END;
	}
	SStatus = XCsuDma_CfgInitialize(CsuDmaPtr, CsuDmaConfig,
			CsuDmaConfig->BaseAddress);
	if (SStatus != XFSBL_SUCCESS) {
		XFsbl_Printf(DEBUG_GENERAL, "XFSBL_ERROR_CSUDMA_INIT_FAIL \n\r");
		Status = XFSBL_ERROR_CSUDMA_INIT_FAIL;
		goto END;
	}
	Status = XFSBL_SUCCESS;
END:
	return Status;
}
u32 XFsbl_CsuDmaInit ( XCsuDma * CsuDmaPtr ) { u32 Status ; s32 SStatus ; XCsuDma_Config * CsuDmaConfig ; if ( CsuDmaPtr == NULL ) { CsuDmaPtr = & CsuDma ; } ( void ) memset ( CsuDmaPtr , 0 , sizeof ( XCsuDma ) ) ; CsuDmaConfig = XCsuDma_LookupConfig ( 0 ) ; if ( NULL == CsuDmaConfig ) { XFsbl_Printf ( DEBUG_GENERAL , " \n \r " ) ; Status = XFSBL_ERROR_CSUDMA_INIT_FAIL ; goto END ; } SStatus = XCsuDma_CfgInitialize ( CsuDmaPtr , CsuDmaConfig , CsuDmaConfig -> BaseAddress ) ; if ( SStatus != XFSBL_SUCCESS ) { XFsbl_Printf ( DEBUG_GENERAL , " \n \r " ) ; Status = XFSBL_ERROR_CSUDMA_INIT_FAIL ; goto END ; } Status = XFSBL_SUCCESS ; END : return Status ; }
This function is used to initialize the DMA driver
 @param       CsuDmaPtr is pointer to XCsuDma instance
This function is used to initialize the DMA driver @param CsuDmaPtr is pointer to XCsuDma instance