XilinxProcessorIPLib/drivers/prc/src/xprc.c
static void XPrc_SendCommand(XPrc *InstancePtr, u16 VsmId, u8 Cmd, u8 Byte,
			u16 Halfword)
{
	u32 Address;
	u32 Data = 0;

	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(Cmd <= XPRC_CR_USER_CTRL_CMD);
	Xil_AssertVoid(VsmId < XPRC_MAX_NUMBER_OF_VSMS);

	Address = XPrc_GetRegisterAddress(InstancePtr, VsmId,
			XPRC_CONTROL_REG, XPRC_REG_TABLE_ROW);

	/* Register format is
	 * 31       16 15   8 7        0
	 * | Halfword | Byte | Command |
	 */
	Data = (Halfword << XPRC_CR_HALFWORD_FIELD_LSB);
	Data |= (Byte << XPRC_CR_BYTE_FIELD_LSB);
	Data |= Cmd;

	xprc_printf(XPRC_DEBUG_GENERAL,"XPrc_SendCommand :: Instance %d,"
		"VSMID = %x, Address = %x, Data = %x (| Halfword %x | Byte"
		"%x | Cmd = %x |)\n\r", InstancePtr->Config.DeviceId,
		VsmId, Address, Data, Halfword, Byte, Cmd);

	XPrc_WriteReg(Address, Data);
}
/*****************************************************************************/
/**
*
* This function sends a command(Shutdown, Restart With No Status, Restart With
* Status, Proceed, User Control) to a Virtual Socket Manager
*
* @param	InstancePtr is a pointer to the PRC instance.
* @param	VsmId is the identifier of the VSM to access.
* @param	Cmd is a Control Register command (Shutdown, Restart with no
*		Status, Restart with Status, Proceed, User control).
* @param	Byte is an 8-bit field containing extra information for the
*		selected command.
* @param	Halfword is a 16-bit field containing extra information for
*		the selected command.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function sends a command(Shutdown, Restart With No Status, Restart With
Status, Proceed, User Control) to a Virtual Socket Manager
This function sends a command ( Shutdown Restart With No Status Restart With Status Proceed User Control ) to a Virtual Socket Manager
static void XPrc_SendCommand(XPrc *InstancePtr, u16 VsmId, u8 Cmd, u8 Byte,
			u16 Halfword)
{
	u32 Address;
	u32 Data = 0;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(Cmd <= XPRC_CR_USER_CTRL_CMD);
	Xil_AssertVoid(VsmId < XPRC_MAX_NUMBER_OF_VSMS);
	Address = XPrc_GetRegisterAddress(InstancePtr, VsmId,
			XPRC_CONTROL_REG, XPRC_REG_TABLE_ROW);
	Data = (Halfword << XPRC_CR_HALFWORD_FIELD_LSB);
	Data |= (Byte << XPRC_CR_BYTE_FIELD_LSB);
	Data |= Cmd;
	xprc_printf(XPRC_DEBUG_GENERAL,"XPrc_SendCommand :: Instance %d,"
		"VSMID = %x, Address = %x, Data = %x (| Halfword %x | Byte"
		"%x | Cmd = %x |)\n\r", InstancePtr->Config.DeviceId,
		VsmId, Address, Data, Halfword, Byte, Cmd);
	XPrc_WriteReg(Address, Data);
}
static void XPrc_SendCommand ( XPrc * InstancePtr , u16 VsmId , u8 Cmd , u8 Byte , u16 Halfword ) { u32 Address ; u32 Data = 0 ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( Cmd <= XPRC_CR_USER_CTRL_CMD ) ; Xil_AssertVoid ( VsmId < XPRC_MAX_NUMBER_OF_VSMS ) ; Address = XPrc_GetRegisterAddress ( InstancePtr , VsmId , XPRC_CONTROL_REG , XPRC_REG_TABLE_ROW ) ; Data = ( Halfword << XPRC_CR_HALFWORD_FIELD_LSB ) ; Data |= ( Byte << XPRC_CR_BYTE_FIELD_LSB ) ; Data |= Cmd ; xprc_printf ( XPRC_DEBUG_GENERAL , " " " " " \n \r " , InstancePtr -> Config . DeviceId , VsmId , Address , Data , Halfword , Byte , Cmd ) ; XPrc_WriteReg ( Address , Data ) ; }
This function sends a command(Shutdown, Restart With No Status, Restart With
Status, Proceed, User Control) to a Virtual Socket Manager
This function sends a command ( Shutdown Restart With No Status Restart With Status Proceed User Control ) to a Virtual Socket Manager
/* Register format is
	 * 31       16 15   8 7        0
	 * | Halfword | Byte | Command |
	 */