XilinxProcessorIPLib/drivers/aienginev2/src/dma/xaie_dma.c
AieRC XAie_DmaUpdateBdAddr(XAie_DevInst *DevInst, XAie_LocType Loc, u64 Addr,
		u8 BdNum)
{
	const XAie_DmaMod *DmaMod;
	u8 TileType;

	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\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;
	if(BdNum > DmaMod->NumBds) {
		XAIE_ERROR("Invalid BD number\n");
		return XAIE_INVALID_BD_NUM;
	}

	if(((Addr & DmaMod->BdProp->AddrAlignMask) != 0U) ||
			(Addr > DmaMod->BdProp->AddrMax)) {
		XAIE_ERROR("Invalid Address\n");
		return XAIE_INVALID_ADDRESS;
	}

	return DmaMod->UpdateBdAddr(DevInst, DmaMod, Loc, Addr, BdNum);
}
/*****************************************************************************/
/**
*
* This API updates the address of the buffer descriptor in the dma module.
*
* @param	DevInst: Device Instance.
* @param	Loc: Location of AIE Tile
* @param	Addr: Buffer address
* @param	BdNum: Hardware BD number to be written to.
*
* @return	XAIE_OK on success, Error code on failure.
*
* @note		This API accesses the hardware directly and does not operate
*		on software descriptor.
******************************************************************************/
This API updates the address of the buffer descriptor in the dma module.
This API updates the address of the buffer descriptor in the dma module .
AieRC XAie_DmaUpdateBdAddr(XAie_DevInst *DevInst, XAie_LocType Loc, u64 Addr,
		u8 BdNum)
{
	const XAie_DmaMod *DmaMod;
	u8 TileType;
	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\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;
	if(BdNum > DmaMod->NumBds) {
		XAIE_ERROR("Invalid BD number\n");
		return XAIE_INVALID_BD_NUM;
	}
	if(((Addr & DmaMod->BdProp->AddrAlignMask) != 0U) ||
			(Addr > DmaMod->BdProp->AddrMax)) {
		XAIE_ERROR("Invalid Address\n");
		return XAIE_INVALID_ADDRESS;
	}
	return DmaMod->UpdateBdAddr(DevInst, DmaMod, Loc, Addr, BdNum);
}
AieRC XAie_DmaUpdateBdAddr ( XAie_DevInst * DevInst , XAie_LocType Loc , u64 Addr , u8 BdNum ) { const XAie_DmaMod * DmaMod ; u8 TileType ; if ( ( DevInst == 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 ; if ( BdNum > DmaMod -> NumBds ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_BD_NUM ; } if ( ( ( Addr & DmaMod -> BdProp -> AddrAlignMask ) != 0U ) || ( Addr > DmaMod -> BdProp -> AddrMax ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ADDRESS ; } return DmaMod -> UpdateBdAddr ( DevInst , DmaMod , Loc , Addr , BdNum ) ; }
This API updates the address of the buffer descriptor in the dma module.
This API updates the address of the buffer descriptor in the dma module .