XilinxProcessorIPLib/drivers/aienginev2/src/dma/xaie_dma.c
AieRC XAie_DmaChannelSetControllerId(XAie_DmaChannelDesc *DmaChannelDesc,
		u32 ControllerId)
{
	const XAie_DmaMod *DmaMod;

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

	DmaMod = DmaChannelDesc->DmaMod;
	if(DmaMod->ChProp->HasControllerId == XAIE_FEATURE_UNAVAILABLE) {
		XAIE_ERROR("Feature unavailable\n");
		return XAIE_FEATURE_NOT_SUPPORTED;
	}

	if(ControllerId > DmaMod->ChProp->ControllerId.Mask >>
			DmaMod->ChProp->ControllerId.Lsb) {
		XAIE_ERROR("Invalid ControllerId: %d\n", ControllerId);
		return XAIE_INVALID_ARGS;
	}

	DmaChannelDesc->ControllerId = ControllerId;

	return XAIE_OK;
}
/*****************************************************************************/
/**
* This api sets the task complete token controller id field in the DMA Channel
* Descriptor.
*
* @param	DmaChannelDesc: Initialized dma channel descriptor.
* @param	ControllerId: Task-complete-token controller ID field
*
* @return	XAIE_OK on success, error code on failure.
*
* @note		The api sets the controller id in the dma channel descriptor and
*		does not configure the descriptor field in the hardware. This
*		API works only for AIE-ML and has no effect on AIE.
*
******************************************************************************/
This api sets the task complete token controller id field in the DMA Channel
Descriptor.
This api sets the task complete token controller id field in the DMA Channel Descriptor .
AieRC XAie_DmaChannelSetControllerId(XAie_DmaChannelDesc *DmaChannelDesc,
		u32 ControllerId)
{
	const XAie_DmaMod *DmaMod;
	if((DmaChannelDesc == XAIE_NULL) ||
			(DmaChannelDesc->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Arguments\n");
		return XAIE_INVALID_ARGS;
	}
	DmaMod = DmaChannelDesc->DmaMod;
	if(DmaMod->ChProp->HasControllerId == XAIE_FEATURE_UNAVAILABLE) {
		XAIE_ERROR("Feature unavailable\n");
		return XAIE_FEATURE_NOT_SUPPORTED;
	}
	if(ControllerId > DmaMod->ChProp->ControllerId.Mask >>
			DmaMod->ChProp->ControllerId.Lsb) {
		XAIE_ERROR("Invalid ControllerId: %d\n", ControllerId);
		return XAIE_INVALID_ARGS;
	}
	DmaChannelDesc->ControllerId = ControllerId;
	return XAIE_OK;
}
AieRC XAie_DmaChannelSetControllerId ( XAie_DmaChannelDesc * DmaChannelDesc , u32 ControllerId ) { const XAie_DmaMod * DmaMod ; if ( ( DmaChannelDesc == XAIE_NULL ) || ( DmaChannelDesc -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } DmaMod = DmaChannelDesc -> DmaMod ; if ( DmaMod -> ChProp -> HasControllerId == XAIE_FEATURE_UNAVAILABLE ) { XAIE_ERROR ( " \n " ) ; return XAIE_FEATURE_NOT_SUPPORTED ; } if ( ControllerId > DmaMod -> ChProp -> ControllerId . Mask >> DmaMod -> ChProp -> ControllerId . Lsb ) { XAIE_ERROR ( " \n " , ControllerId ) ; return XAIE_INVALID_ARGS ; } DmaChannelDesc -> ControllerId = ControllerId ; return XAIE_OK ; }
This api sets the task complete token controller id field in the DMA Channel
Descriptor.
This api sets the task complete token controller id field in the DMA Channel Descriptor .