lib/sw_services/xilpm/src/versal/server/xpm_ipi.c
XStatus XPm_IpiSend(u32 IpiMask, u32 *Payload)
{
	XStatus Status = XST_FAILURE;

	Status = XPlmi_IpiPollForAck(IpiMask, PM_IPI_TIMEOUT);
	if (XST_SUCCESS != Status) {
		PmDbg("%s: ERROR: Timeout expired\n", __func__);
		goto done;
	}

	Status = XPlmi_IpiWrite(IpiMask, Payload,
				PAYLOAD_ARG_CNT, XIPIPSU_BUF_TYPE_MSG);
	if (XST_SUCCESS != Status) {
		PmDbg("%s: ERROR writing to IPI request buffer\n", __func__);
		goto done;
	}

	Status = XPlmi_IpiTrigger(IpiMask);

done:
	return Status;
}
/****************************************************************************/
/**
 * @brief	Sends IPI request to the target module
 *
 * @param	IpiMask		IPI interrupt mask of target
 * @param	Payload		API id and call arguments to be written in IPI
 *				buffer
 *
 * @return	XST_SUCCESS if successful else XST_FAILURE or an error code
 * or a reason code
 *
 * @note	None
 *
 ****************************************************************************/
@brief       Sends IPI request to the target module
@param       IpiMask         IPI interrupt mask of target
@param       Payload         API id and call arguments to be written in IPI
buffer

@return      XST_SUCCESS if successful else XST_FAILURE or an error code
or a reason code

@note        None
@brief Sends IPI request to the target module @param IpiMask IPI interrupt mask of target @param Payload API id and call arguments to be written in IPI buffer @return XST_SUCCESS if successful else XST_FAILURE or an error code or a reason code @note None
XStatus XPm_IpiSend(u32 IpiMask, u32 *Payload)
{
	XStatus Status = XST_FAILURE;
	Status = XPlmi_IpiPollForAck(IpiMask, PM_IPI_TIMEOUT);
	if (XST_SUCCESS != Status) {
		PmDbg("%s: ERROR: Timeout expired\n", __func__);
		goto done;
	}
	Status = XPlmi_IpiWrite(IpiMask, Payload,
				PAYLOAD_ARG_CNT, XIPIPSU_BUF_TYPE_MSG);
	if (XST_SUCCESS != Status) {
		PmDbg("%s: ERROR writing to IPI request buffer\n", __func__);
		goto done;
	}
	Status = XPlmi_IpiTrigger(IpiMask);
done:
	return Status;
}
XStatus XPm_IpiSend ( u32 IpiMask , u32 * Payload ) { XStatus Status = XST_FAILURE ; Status = XPlmi_IpiPollForAck ( IpiMask , PM_IPI_TIMEOUT ) ; if ( XST_SUCCESS != Status ) { PmDbg ( " \n " , __func__ ) ; goto done ; } Status = XPlmi_IpiWrite ( IpiMask , Payload , PAYLOAD_ARG_CNT , XIPIPSU_BUF_TYPE_MSG ) ; if ( XST_SUCCESS != Status ) { PmDbg ( " \n " , __func__ ) ; goto done ; } Status = XPlmi_IpiTrigger ( IpiMask ) ; done : return Status ; }
@brief       Sends IPI request to the target module
 @param       IpiMask         IPI interrupt mask of target
 @param       Payload         API id and call arguments to be written in IPI
                              buffer
@brief Sends IPI request to the target module @param IpiMask IPI interrupt mask of target @param Payload API id and call arguments to be written in IPI buffer