XilinxProcessorIPLib/drivers/board_common/src/rfclk/src/xrfclk.c
static u32 XRFClk_MuxSPISDORevert(u32 ChipId)
{
#ifdef XPS_BOARD_ZCU111
	Xil_AssertNonvoid(ChipId != RFCLK_LMK);
#endif

	u32 ret;
	u8 tx[4];
	tx[0] = SELECT_SPI_SDO(ChipId);
	tx[1] = (MuxOutRegStorage[ChipId] >> 16) & 0xff;
	tx[2] = (MuxOutRegStorage[ChipId] >> 8) & 0xff;
	tx[3] = MuxOutRegStorage[ChipId] & 0xff;

	ret = XRFClk_I2CWrData(FD_BRIDGE, I2C_ADDR_I2C2SPI_BRIDGE, tx, 4);
	if (XST_FAILURE == ret) {
		LOG("revert back a bridge MUX");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
/****************************************************************************/
/**
*
* This function is used to set MUXOUT pin to the original state after read
* completion. Usually the pin is set to indicate a lock state of a PLL.
*
* @param	ChipId indicates the RF clock chip Id.
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is used to set MUXOUT pin to the original state after read
completion. Usually the pin is set to indicate a lock state of a PLL.
This function is used to set MUXOUT pin to the original state after read completion . Usually the pin is set to indicate a lock state of a PLL .
static u32 XRFClk_MuxSPISDORevert(u32 ChipId)
{
#ifdef XPS_BOARD_ZCU111
	Xil_AssertNonvoid(ChipId != RFCLK_LMK);
#endif
	u32 ret;
	u8 tx[4];
	tx[0] = SELECT_SPI_SDO(ChipId);
	tx[1] = (MuxOutRegStorage[ChipId] >> 16) & 0xff;
	tx[2] = (MuxOutRegStorage[ChipId] >> 8) & 0xff;
	tx[3] = MuxOutRegStorage[ChipId] & 0xff;
	ret = XRFClk_I2CWrData(FD_BRIDGE, I2C_ADDR_I2C2SPI_BRIDGE, tx, 4);
	if (XST_FAILURE == ret) {
		LOG("revert back a bridge MUX");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
static u32 XRFClk_MuxSPISDORevert ( u32 ChipId ) { #ifdef XPS_BOARD_ZCU111 Xil_AssertNonvoid ( ChipId != RFCLK_LMK ) ; #endif u32 ret ; u8 tx [ 4 ] ; tx [ 0 ] = SELECT_SPI_SDO ( ChipId ) ; tx [ 1 ] = ( MuxOutRegStorage [ ChipId ] >> 16 ) & 0xff ; tx [ 2 ] = ( MuxOutRegStorage [ ChipId ] >> 8 ) & 0xff ; tx [ 3 ] = MuxOutRegStorage [ ChipId ] & 0xff ; ret = XRFClk_I2CWrData ( FD_BRIDGE , I2C_ADDR_I2C2SPI_BRIDGE , tx , 4 ) ; if ( XST_FAILURE == ret ) { LOG ( " " ) ; return XST_FAILURE ; } return XST_SUCCESS ; }
This function is used to set MUXOUT pin to the original state after read
completion.
This function is used to set MUXOUT pin to the original state after read completion .