XilinxProcessorIPLib/drivers/aienginev2/src/dma/xaie_dma.c
AieRC XAie_DmaChannelResetAll(XAie_DevInst *DevInst, XAie_LocType Loc,
		XAie_DmaChReset Reset)
{
	u8 TileType;
	AieRC RC;
	const XAie_DmaMod *DmaMod;

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

	if(Reset > DMA_CHANNEL_RESET) {
		XAIE_ERROR("Invalid DMA channel reset value\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;

	/* Reset MM2S */
	for(u8 i = 0U; i < DmaMod->NumChannels; i++) {
		RC = XAie_DmaChannelReset(DevInst, Loc, i, DMA_MM2S, Reset);
		if(RC != XAIE_OK) return RC;
	}

	/* Reset S2MM */
	for(u8 i = 0U; i < DmaMod->NumChannels; i++) {
		RC = XAie_DmaChannelReset(DevInst, Loc, i, DMA_S2MM, Reset);
		if(RC != XAIE_OK) return RC;
	}

	return  XAIE_OK;
}
/*****************************************************************************/
/**
*
* This API resets all the Dma Channels of an AIE Tile.
*
* @param	DevInst: Device Instance
* @param	Loc: Location of AIE Tile
* @param	Reset: DMA_CHANNEL_UNRESET/RESET
*
* @return	XAIE_OK on success, Error code on failure.
*
* @note		Returns error for SHIMNOC tiles.
*
******************************************************************************/
This API resets all the Dma Channels of an AIE Tile.
This API resets all the Dma Channels of an AIE Tile .
AieRC XAie_DmaChannelResetAll(XAie_DevInst *DevInst, XAie_LocType Loc,
		XAie_DmaChReset Reset)
{
	u8 TileType;
	AieRC RC;
	const XAie_DmaMod *DmaMod;
	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\n");
		return XAIE_INVALID_ARGS;
	}
	if(Reset > DMA_CHANNEL_RESET) {
		XAIE_ERROR("Invalid DMA channel reset value\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;
	for(u8 i = 0U; i < DmaMod->NumChannels; i++) {
		RC = XAie_DmaChannelReset(DevInst, Loc, i, DMA_MM2S, Reset);
		if(RC != XAIE_OK) return RC;
	}
	for(u8 i = 0U; i < DmaMod->NumChannels; i++) {
		RC = XAie_DmaChannelReset(DevInst, Loc, i, DMA_S2MM, Reset);
		if(RC != XAIE_OK) return RC;
	}
	return  XAIE_OK;
}
AieRC XAie_DmaChannelResetAll ( XAie_DevInst * DevInst , XAie_LocType Loc , XAie_DmaChReset Reset ) { u8 TileType ; AieRC RC ; const XAie_DmaMod * DmaMod ; if ( ( DevInst == XAIE_NULL ) || ( DevInst -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } if ( Reset > DMA_CHANNEL_RESET ) { 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 ; for ( u8 i = 0U ; i < DmaMod -> NumChannels ; i ++ ) { RC = XAie_DmaChannelReset ( DevInst , Loc , i , DMA_MM2S , Reset ) ; if ( RC != XAIE_OK ) return RC ; } for ( u8 i = 0U ; i < DmaMod -> NumChannels ; i ++ ) { RC = XAie_DmaChannelReset ( DevInst , Loc , i , DMA_S2MM , Reset ) ; if ( RC != XAIE_OK ) return RC ; } return XAIE_OK ; }
This API resets all the Dma Channels of an AIE Tile.
This API resets all the Dma Channels of an AIE Tile .
/* Reset MM2S */ /* Reset S2MM */