XilinxProcessorIPLib/drivers/board_common/src/rfclk/src/xrfclk.c
u32 XRFClk_GetConfigFromOneChip(u32 ChipId, u32 *CfgData)
{
	Xil_AssertNonvoid(ChipId < RFCLK_CHIP_NUM);
	Xil_AssertNonvoid(CfgData != NULL);
#ifdef XPS_BOARD_ZCU111
	Xil_AssertNonvoid(ChipId != RFCLK_LMK);
#endif

	u32 ret = XST_SUCCESS;
	u32 *d = CfgData;

	/* Setup environment for read */
	if (XRFClk_MuxSPISDO(ChipId) == XST_FAILURE) {
		LOG("mux SPISDO");
		return XST_FAILURE;
	}

	if (ChipId == RFCLK_LMK)
		ret = XRFClk_getConfig_fromLMK(ChipId, (u32 *const)LMK_CKin, d);
	else
		ret = XRFClk_getConfig_fromLMX(ChipId, d);

	/* Revert the environment */
	if (XRFClk_MuxSPISDORevert(ChipId) == XST_FAILURE) {
		LOG("revert SPISDO");
		ret = XST_FAILURE;
	}

	return ret;
}
/****************************************************************************/
/**
*
* This function is used to read the full configuration data from one of
* LMX2594 or LMX04828.
*
* @param	ChipId indicates the RF clock chip Id.
* @param	CfgData the array of the RF clock chip configuration data.
*
* @return
*	- XST_SUCCESS if successful.
*	- XST_FAILURE if failed.
*
* @note		None
*
****************************************************************************/
This function is used to read the full configuration data from one of
LMX2594 or LMX04828.
This function is used to read the full configuration data from one of LMX2594 or LMX04828 .
u32 XRFClk_GetConfigFromOneChip(u32 ChipId, u32 *CfgData)
{
	Xil_AssertNonvoid(ChipId < RFCLK_CHIP_NUM);
	Xil_AssertNonvoid(CfgData != NULL);
#ifdef XPS_BOARD_ZCU111
	Xil_AssertNonvoid(ChipId != RFCLK_LMK);
#endif
	u32 ret = XST_SUCCESS;
	u32 *d = CfgData;
	if (XRFClk_MuxSPISDO(ChipId) == XST_FAILURE) {
		LOG("mux SPISDO");
		return XST_FAILURE;
	}
	if (ChipId == RFCLK_LMK)
		ret = XRFClk_getConfig_fromLMK(ChipId, (u32 *const)LMK_CKin, d);
	else
		ret = XRFClk_getConfig_fromLMX(ChipId, d);
	if (XRFClk_MuxSPISDORevert(ChipId) == XST_FAILURE) {
		LOG("revert SPISDO");
		ret = XST_FAILURE;
	}
	return ret;
}
u32 XRFClk_GetConfigFromOneChip ( u32 ChipId , u32 * CfgData ) { Xil_AssertNonvoid ( ChipId < RFCLK_CHIP_NUM ) ; Xil_AssertNonvoid ( CfgData != NULL ) ; #ifdef XPS_BOARD_ZCU111 Xil_AssertNonvoid ( ChipId != RFCLK_LMK ) ; #endif u32 ret = XST_SUCCESS ; u32 * d = CfgData ; if ( XRFClk_MuxSPISDO ( ChipId ) == XST_FAILURE ) { LOG ( " " ) ; return XST_FAILURE ; } if ( ChipId == RFCLK_LMK ) ret = XRFClk_getConfig_fromLMK ( ChipId , ( u32 * const ) LMK_CKin , d ) ; else ret = XRFClk_getConfig_fromLMX ( ChipId , d ) ; if ( XRFClk_MuxSPISDORevert ( ChipId ) == XST_FAILURE ) { LOG ( " " ) ; ret = XST_FAILURE ; } return ret ; }
This function is used to read the full configuration data from one of
LMX2594 or LMX04828.
This function is used to read the full configuration data from one of LMX2594 or LMX04828 .
/* Setup environment for read */ /* Revert the environment */