XilinxProcessorIPLib/drivers/vphy/src/xvphy.c
u32 XVphy_IsBonded(XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
{
	XVphy_SysClkDataSelType RxSysClkDataSel;
	XVphy_SysClkOutSelType RxSysClkOutSel;
	XVphy_SysClkDataSelType TxSysClkDataSel;
	XVphy_SysClkOutSelType TxSysClkOutSel;

	if (ChId == XVPHY_CHANNEL_ID_CHA) {
		ChId = XVPHY_CHANNEL_ID_CH1;
	}

	RxSysClkDataSel = XVphy_GetSysClkDataSel(InstancePtr, QuadId,
							XVPHY_DIR_RX, ChId);
	RxSysClkOutSel = XVphy_GetSysClkOutSel(InstancePtr, QuadId,
							XVPHY_DIR_RX, ChId);
	TxSysClkDataSel = XVphy_GetSysClkDataSel(InstancePtr, QuadId,
							XVPHY_DIR_TX, ChId);
	TxSysClkOutSel = XVphy_GetSysClkOutSel(InstancePtr, QuadId,
							XVPHY_DIR_TX, ChId);

	if ((RxSysClkDataSel == TxSysClkDataSel) &&
					(RxSysClkOutSel == TxSysClkOutSel)) {
		return TRUE;
	}

	return FALSE;
}
/*****************************************************************************/
/**
* This function returns true when the RX and TX are bonded and are running
* from the same (RX) reference clock.
*
* @param	InstancePtr is a pointer to the XVphy core instance.
*
* @return	TRUE if the RX and TX are using the same PLL, FALSE otherwise.
*
* @note		None.
*
******************************************************************************/
This function returns true when the RX and TX are bonded and are running
from the same (RX) reference clock.
This function returns true when the RX and TX are bonded and are running from the same ( RX ) reference clock .
u32 XVphy_IsBonded(XVphy *InstancePtr, u8 QuadId, XVphy_ChannelId ChId)
{
	XVphy_SysClkDataSelType RxSysClkDataSel;
	XVphy_SysClkOutSelType RxSysClkOutSel;
	XVphy_SysClkDataSelType TxSysClkDataSel;
	XVphy_SysClkOutSelType TxSysClkOutSel;
	if (ChId == XVPHY_CHANNEL_ID_CHA) {
		ChId = XVPHY_CHANNEL_ID_CH1;
	}
	RxSysClkDataSel = XVphy_GetSysClkDataSel(InstancePtr, QuadId,
							XVPHY_DIR_RX, ChId);
	RxSysClkOutSel = XVphy_GetSysClkOutSel(InstancePtr, QuadId,
							XVPHY_DIR_RX, ChId);
	TxSysClkDataSel = XVphy_GetSysClkDataSel(InstancePtr, QuadId,
							XVPHY_DIR_TX, ChId);
	TxSysClkOutSel = XVphy_GetSysClkOutSel(InstancePtr, QuadId,
							XVPHY_DIR_TX, ChId);
	if ((RxSysClkDataSel == TxSysClkDataSel) &&
					(RxSysClkOutSel == TxSysClkOutSel)) {
		return TRUE;
	}
	return FALSE;
}
u32 XVphy_IsBonded ( XVphy * InstancePtr , u8 QuadId , XVphy_ChannelId ChId ) { XVphy_SysClkDataSelType RxSysClkDataSel ; XVphy_SysClkOutSelType RxSysClkOutSel ; XVphy_SysClkDataSelType TxSysClkDataSel ; XVphy_SysClkOutSelType TxSysClkOutSel ; if ( ChId == XVPHY_CHANNEL_ID_CHA ) { ChId = XVPHY_CHANNEL_ID_CH1 ; } RxSysClkDataSel = XVphy_GetSysClkDataSel ( InstancePtr , QuadId , XVPHY_DIR_RX , ChId ) ; RxSysClkOutSel = XVphy_GetSysClkOutSel ( InstancePtr , QuadId , XVPHY_DIR_RX , ChId ) ; TxSysClkDataSel = XVphy_GetSysClkDataSel ( InstancePtr , QuadId , XVPHY_DIR_TX , ChId ) ; TxSysClkOutSel = XVphy_GetSysClkOutSel ( InstancePtr , QuadId , XVPHY_DIR_TX , ChId ) ; if ( ( RxSysClkDataSel == TxSysClkDataSel ) && ( RxSysClkOutSel == TxSysClkOutSel ) ) { return TRUE ; } return FALSE ; }
This function returns true when the RX and TX are bonded and are running
from the same (RX) reference clock.
This function returns true when the RX and TX are bonded and are running from the same ( RX ) reference clock .