lib/sw_services/xilplmi/src/xplmi_generic.c
static int XPlmi_MaskWrite64(XPlmi_Cmd *Cmd)
{
	int Status = XST_FAILURE;
	u64 Addr = ((u64)Cmd->Payload[0U] << 32U) | Cmd->Payload[1U];
	u32 Mask = Cmd->Payload[2U];
	u32 Value = Cmd->Payload[3U];
	u32 ReadVal;

	XPlmi_Printf(DEBUG_DETAILED,
		"%s, Addr: 0x%0x%08x,  Mask 0x%0x, Val: 0x%0x\n\r",
		__func__, (u32)(Addr >> 32U), (u32)Addr, Mask, Value);

	/*
	 * Read the Register value
	 */
	ReadVal = XPlmi_In64(Addr);
	ReadVal = (ReadVal & (~Mask)) | (Mask & Value);
	XPlmi_Out64(Addr, ReadVal);
	Status = XST_SUCCESS;

	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function provides 64 bit mask write command execution.
 *  		Command payload parameters are
 *		- High Address
 *		- Low Address
 *		- Mask
 *		- Value
 *
 * @param	Cmd is pointer to the command structure
 *
 * @return	XST_SUCCESS
 *
 *****************************************************************************/
@brief       This function provides 64 bit mask write command execution.
Command payload parameters are
- High Address
- Low Address
- Mask
- Value

@param       Cmd is pointer to the command structure


@brief This function provides 64 bit mask write command execution . Command payload parameters are - High Address - Low Address - Mask - Value @param Cmd is pointer to the command structure
static int XPlmi_MaskWrite64(XPlmi_Cmd *Cmd)
{
	int Status = XST_FAILURE;
	u64 Addr = ((u64)Cmd->Payload[0U] << 32U) | Cmd->Payload[1U];
	u32 Mask = Cmd->Payload[2U];
	u32 Value = Cmd->Payload[3U];
	u32 ReadVal;
	XPlmi_Printf(DEBUG_DETAILED,
		"%s, Addr: 0x%0x%08x,  Mask 0x%0x, Val: 0x%0x\n\r",
		__func__, (u32)(Addr >> 32U), (u32)Addr, Mask, Value);
	ReadVal = XPlmi_In64(Addr);
	ReadVal = (ReadVal & (~Mask)) | (Mask & Value);
	XPlmi_Out64(Addr, ReadVal);
	Status = XST_SUCCESS;
	return Status;
}
static int XPlmi_MaskWrite64 ( XPlmi_Cmd * Cmd ) { int Status = XST_FAILURE ; u64 Addr = ( ( u64 ) Cmd -> Payload [ 0U ] << 32U ) | Cmd -> Payload [ 1U ] ; u32 Mask = Cmd -> Payload [ 2U ] ; u32 Value = Cmd -> Payload [ 3U ] ; u32 ReadVal ; XPlmi_Printf ( DEBUG_DETAILED , " \n \r " , __func__ , ( u32 ) ( Addr >> 32U ) , ( u32 ) Addr , Mask , Value ) ; ReadVal = XPlmi_In64 ( Addr ) ; ReadVal = ( ReadVal & ( ~ Mask ) ) | ( Mask & Value ) ; XPlmi_Out64 ( Addr , ReadVal ) ; Status = XST_SUCCESS ; return Status ; }
@brief       This function provides 64 bit mask write command execution.
@brief This function provides 64 bit mask write command execution .
/*
	 * Read the Register value
	 */