XilinxProcessorIPLib/drivers/aienginev2/src/dma/xaie_dma.c
AieRC XAie_DmaChannelDescInit(XAie_DevInst *DevInst,
		XAie_DmaChannelDesc *DmaChannelDesc, XAie_LocType Loc)
{
	u8 TileType;
	const XAie_DmaMod *DmaMod;

	if((DevInst == XAIE_NULL) || (DmaChannelDesc == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid arguments\n");
		return XAIE_INVALID_ARGS;
	}

	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType == XAIEGBL_TILE_TYPE_SHIMPL) {
		XAIE_ERROR("Invalid Tile Type\n");
		return XAIE_INVALID_TILE;
	}

	DmaMod = DevInst->DevProp.DevMod[TileType].DmaMod;

	memset((void *)DmaChannelDesc, 0U, sizeof(XAie_DmaChannelDesc));

	DmaChannelDesc->TileType = TileType;
	DmaChannelDesc->IsReady = XAIE_COMPONENT_IS_READY;
	DmaChannelDesc->DmaMod = DmaMod;

	return XAIE_OK;
}
/*****************************************************************************/
/**
*
* This API initializes the Dma Channel Descriptor for AIE DMAs for a given
* location.
*
* @param	DevInst: Device Instance.
* @param	DmaChannelDesc: Pointer to user allocated dma channel descriptor
* @param	Loc: Location of AIE-ML Tile
*
* @return	XAIE_OK on success, error code on failure.
*
* @note		This API should be called before setting individual fields for
* 		Dma Channel Descriptor. This API works only for AIE-ML and has
* 		no effect on AIE.
*
******************************************************************************/
This API initializes the Dma Channel Descriptor for AIE DMAs for a given
location.
This API initializes the Dma Channel Descriptor for AIE DMAs for a given location .
AieRC XAie_DmaChannelDescInit(XAie_DevInst *DevInst,
		XAie_DmaChannelDesc *DmaChannelDesc, XAie_LocType Loc)
{
	u8 TileType;
	const XAie_DmaMod *DmaMod;
	if((DevInst == XAIE_NULL) || (DmaChannelDesc == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid arguments\n");
		return XAIE_INVALID_ARGS;
	}
	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType == XAIEGBL_TILE_TYPE_SHIMPL) {
		XAIE_ERROR("Invalid Tile Type\n");
		return XAIE_INVALID_TILE;
	}
	DmaMod = DevInst->DevProp.DevMod[TileType].DmaMod;
	memset((void *)DmaChannelDesc, 0U, sizeof(XAie_DmaChannelDesc));
	DmaChannelDesc->TileType = TileType;
	DmaChannelDesc->IsReady = XAIE_COMPONENT_IS_READY;
	DmaChannelDesc->DmaMod = DmaMod;
	return XAIE_OK;
}
AieRC XAie_DmaChannelDescInit ( XAie_DevInst * DevInst , XAie_DmaChannelDesc * DmaChannelDesc , XAie_LocType Loc ) { u8 TileType ; const XAie_DmaMod * DmaMod ; if ( ( DevInst == XAIE_NULL ) || ( DmaChannelDesc == XAIE_NULL ) || ( DevInst -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } TileType = DevInst -> DevOps -> GetTTypefromLoc ( DevInst , Loc ) ; if ( TileType == XAIEGBL_TILE_TYPE_SHIMPL ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_TILE ; } DmaMod = DevInst -> DevProp . DevMod [ TileType ] . DmaMod ; memset ( ( void * ) DmaChannelDesc , 0U , sizeof ( XAie_DmaChannelDesc ) ) ; DmaChannelDesc -> TileType = TileType ; DmaChannelDesc -> IsReady = XAIE_COMPONENT_IS_READY ; DmaChannelDesc -> DmaMod = DmaMod ; return XAIE_OK ; }
This API initializes the Dma Channel Descriptor for AIE DMAs for a given
location.
This API initializes the Dma Channel Descriptor for AIE DMAs for a given location .