lib/sw_services/xilfpga/src/interface/zynqmp/xilfpga_ipi_pcap.c
static u32 XFpga_IPI_GetPLConfigRegPcap(const XFpga *InstancePtr)
{
	volatile u32 Status = XFPGA_FAILURE;
	u32 ReqBuffer[FPGA_MSG_LEN] = {0};
	UINTPTR ReadbackAddr = InstancePtr->ReadInfo.ReadbackAddr;

	ReqBuffer[0U] = PM_FPGA_READ;
	ReqBuffer[1U] = InstancePtr->ReadInfo.ConfigReg_NumFrames;
	ReqBuffer[2U] = (u32)ReadbackAddr;
	ReqBuffer[3U] = UPPER_32_BITS(ReadbackAddr);
	ReqBuffer[4U] = FPGA_REG_READBACK;

	/* Send an IPI Req Message */
	Status = XMailbox_SendData(&XMboxInstance, XMAILBOX_IPI3, ReqBuffer,
				   FPGA_MSG_LEN, XILMBOX_MSG_TYPE_REQ,
				   FPGA_IPI_TYPE_BLOCKING);
	if (Status != (u32)XST_SUCCESS) {
		goto END;
	}

	Status = XFPGA_FAILURE;
	Status = XMailbox_Recv(&XMboxInstance, XMAILBOX_IPI3, ReqBuffer,
			       FPGA_IPI_RESP2, XILMBOX_MSG_TYPE_RESP);
	if (Status != (u32)XST_SUCCESS) {
		goto END;
	}

	memcpy((char *)ReadbackAddr, (char *)&ReqBuffer[1U],
		sizeof(ReqBuffer[1U]));
	Status =  ReqBuffer[0U];

END:
	return Status;
}
/*****************************************************************************/
/**
 * This function performs the readback of fpga configuration data/registers.
 *
 * @param InstancePtr Pointer to the XFpga structure.
 *
 * @return
 *               - XFPGA_SUCCESS if successful
 *               - XFPGA_FAILURE if unsuccessful
 *
 * @note None.
 ****************************************************************************/
This function performs the readback of fpga configuration data/registers.
@param InstancePtr Pointer to the XFpga structure.

@return
- XFPGA_SUCCESS if successful
- XFPGA_FAILURE if unsuccessful

@note None.
This function performs the readback of fpga configuration data / registers . @param InstancePtr Pointer to the XFpga structure . @return - XFPGA_SUCCESS if successful - XFPGA_FAILURE if unsuccessful @note None .
static u32 XFpga_IPI_GetPLConfigRegPcap(const XFpga *InstancePtr)
{
	volatile u32 Status = XFPGA_FAILURE;
	u32 ReqBuffer[FPGA_MSG_LEN] = {0};
	UINTPTR ReadbackAddr = InstancePtr->ReadInfo.ReadbackAddr;
	ReqBuffer[0U] = PM_FPGA_READ;
	ReqBuffer[1U] = InstancePtr->ReadInfo.ConfigReg_NumFrames;
	ReqBuffer[2U] = (u32)ReadbackAddr;
	ReqBuffer[3U] = UPPER_32_BITS(ReadbackAddr);
	ReqBuffer[4U] = FPGA_REG_READBACK;
	Status = XMailbox_SendData(&XMboxInstance, XMAILBOX_IPI3, ReqBuffer,
				   FPGA_MSG_LEN, XILMBOX_MSG_TYPE_REQ,
				   FPGA_IPI_TYPE_BLOCKING);
	if (Status != (u32)XST_SUCCESS) {
		goto END;
	}
	Status = XFPGA_FAILURE;
	Status = XMailbox_Recv(&XMboxInstance, XMAILBOX_IPI3, ReqBuffer,
			       FPGA_IPI_RESP2, XILMBOX_MSG_TYPE_RESP);
	if (Status != (u32)XST_SUCCESS) {
		goto END;
	}
	memcpy((char *)ReadbackAddr, (char *)&ReqBuffer[1U],
		sizeof(ReqBuffer[1U]));
	Status =  ReqBuffer[0U];
END:
	return Status;
}
static u32 XFpga_IPI_GetPLConfigRegPcap ( const XFpga * InstancePtr ) { volatile u32 Status = XFPGA_FAILURE ; u32 ReqBuffer [ FPGA_MSG_LEN ] = { 0 } ; UINTPTR ReadbackAddr = InstancePtr -> ReadInfo . ReadbackAddr ; ReqBuffer [ 0U ] = PM_FPGA_READ ; ReqBuffer [ 1U ] = InstancePtr -> ReadInfo . ConfigReg_NumFrames ; ReqBuffer [ 2U ] = ( u32 ) ReadbackAddr ; ReqBuffer [ 3U ] = UPPER_32_BITS ( ReadbackAddr ) ; ReqBuffer [ 4U ] = FPGA_REG_READBACK ; Status = XMailbox_SendData ( & XMboxInstance , XMAILBOX_IPI3 , ReqBuffer , FPGA_MSG_LEN , XILMBOX_MSG_TYPE_REQ , FPGA_IPI_TYPE_BLOCKING ) ; if ( Status != ( u32 ) XST_SUCCESS ) { goto END ; } Status = XFPGA_FAILURE ; Status = XMailbox_Recv ( & XMboxInstance , XMAILBOX_IPI3 , ReqBuffer , FPGA_IPI_RESP2 , XILMBOX_MSG_TYPE_RESP ) ; if ( Status != ( u32 ) XST_SUCCESS ) { goto END ; } memcpy ( ( char * ) ReadbackAddr , ( char * ) & ReqBuffer [ 1U ] , sizeof ( ReqBuffer [ 1U ] ) ) ; Status = ReqBuffer [ 0U ] ; END : return Status ; }
This function performs the readback of fpga configuration data/registers.
This function performs the readback of fpga configuration data / registers .
/* Send an IPI Req Message */