XilinxProcessorIPLib/drivers/board_common/src/rfclk/src/xrfclk.c
static u32 XRFClk_WriteRegToLMK04208(u32 ChipId, u32 d)
{
	Xil_AssertNonvoid(ChipId == RFCLK_LMK);
	u8 tx[5] = { SELECT_SPI_SDO(ChipId), (d >> 24) & 0xff, (d >> 16) & 0xff,
		     (d >> 8) & 0xff, d & 0xff };
	int ret;

	/* Write register */
	ret = XRFClk_I2CWrData(FD_BRIDGE, I2C_ADDR_I2C2SPI_BRIDGE, tx, 5);
	if (ret == XST_FAILURE) {
		LOG("write to LMK");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
/****************************************************************************/
/**
*
* This function is used to write to LMK04208 register.
*
* @param	ChipId indicates the RF clock chip Id.
* @param	d data to be written..
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is used to write to LMK04208 register.
This function is used to write to LMK04208 register .
static u32 XRFClk_WriteRegToLMK04208(u32 ChipId, u32 d)
{
	Xil_AssertNonvoid(ChipId == RFCLK_LMK);
	u8 tx[5] = { SELECT_SPI_SDO(ChipId), (d >> 24) & 0xff, (d >> 16) & 0xff,
		     (d >> 8) & 0xff, d & 0xff };
	int ret;
	ret = XRFClk_I2CWrData(FD_BRIDGE, I2C_ADDR_I2C2SPI_BRIDGE, tx, 5);
	if (ret == XST_FAILURE) {
		LOG("write to LMK");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
static u32 XRFClk_WriteRegToLMK04208 ( u32 ChipId , u32 d ) { Xil_AssertNonvoid ( ChipId == RFCLK_LMK ) ; u8 tx [ 5 ] = { SELECT_SPI_SDO ( ChipId ) , ( d >> 24 ) & 0xff , ( d >> 16 ) & 0xff , ( d >> 8 ) & 0xff , d & 0xff } ; int ret ; ret = XRFClk_I2CWrData ( FD_BRIDGE , I2C_ADDR_I2C2SPI_BRIDGE , tx , 5 ) ; if ( ret == XST_FAILURE ) { LOG ( " " ) ; return XST_FAILURE ; } return XST_SUCCESS ; }
This function is used to write to LMK04208 register.
This function is used to write to LMK04208 register .
/* Write register */