XilinxProcessorIPLib/drivers/aienginev2/src/dma/xaie_dma.c
static AieRC _XAie_DmaLockConfig(XAie_DmaDesc *DmaDesc, XAie_Lock Acq,
		XAie_Lock Rel, u8 AcqEn, u8 RelEn)
{
	const XAie_DmaMod *DmaMod;
	const XAie_LockMod *LockMod;

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

	DmaMod = DmaDesc->DmaMod;
	LockMod = DmaDesc->LockMod;
	if((Acq.LockId > DmaMod->NumLocks) ||
			(Acq.LockVal > LockMod->LockValUpperBound) ||
			(Rel.LockVal > LockMod->LockValUpperBound)) {
		XAIE_ERROR("Invalid Lock\n");
		return XAIE_INVALID_LOCK_ID;
	}

	return DmaMod->SetLock(DmaDesc, Acq, Rel, AcqEn, RelEn);
}
/*****************************************************************************/
/**
*
* This API initializes the Acquire and Release Locks for a a Dma descriptor.
*
* @param	DmaDesc: Initialized Dma Descriptor.
* @param	Acq: Lock object with acquire lock ID and lock value.
* @param	Rel: Lock object with release lock ID and lock value.
* @param 	AcqEn: XAIE_ENABLE/XAIE_DISABLE for enable or disable acquire
*		lock.
* @param 	RelEn: XAIE_ENABLE/XAIE_DISABLE for enable or disable release
*		lock.
*
* @return	XAIE_OK on success, Error code on failure.
*
* @note		Internal Only.
*
******************************************************************************/
This API initializes the Acquire and Release Locks for a a Dma descriptor.
This API initializes the Acquire and Release Locks for a a Dma descriptor .
static AieRC _XAie_DmaLockConfig(XAie_DmaDesc *DmaDesc, XAie_Lock Acq,
		XAie_Lock Rel, u8 AcqEn, u8 RelEn)
{
	const XAie_DmaMod *DmaMod;
	const XAie_LockMod *LockMod;
	if((DmaDesc == XAIE_NULL) ||
			(DmaDesc->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Arguments\n");
		return XAIE_INVALID_ARGS;
	}
	DmaMod = DmaDesc->DmaMod;
	LockMod = DmaDesc->LockMod;
	if((Acq.LockId > DmaMod->NumLocks) ||
			(Acq.LockVal > LockMod->LockValUpperBound) ||
			(Rel.LockVal > LockMod->LockValUpperBound)) {
		XAIE_ERROR("Invalid Lock\n");
		return XAIE_INVALID_LOCK_ID;
	}
	return DmaMod->SetLock(DmaDesc, Acq, Rel, AcqEn, RelEn);
}
static AieRC _XAie_DmaLockConfig ( XAie_DmaDesc * DmaDesc , XAie_Lock Acq , XAie_Lock Rel , u8 AcqEn , u8 RelEn ) { const XAie_DmaMod * DmaMod ; const XAie_LockMod * LockMod ; if ( ( DmaDesc == XAIE_NULL ) || ( DmaDesc -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } DmaMod = DmaDesc -> DmaMod ; LockMod = DmaDesc -> LockMod ; if ( ( Acq . LockId > DmaMod -> NumLocks ) || ( Acq . LockVal > LockMod -> LockValUpperBound ) || ( Rel . LockVal > LockMod -> LockValUpperBound ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_LOCK_ID ; } return DmaMod -> SetLock ( DmaDesc , Acq , Rel , AcqEn , RelEn ) ; }
This API initializes the Acquire and Release Locks for a a Dma descriptor.
This API initializes the Acquire and Release Locks for a a Dma descriptor .