XilinxProcessorIPLib/drivers/vphy/src/xvphy_gtye4.c
static u8 XVphy_MToDrpEncoding(XVphy *InstancePtr, u8 QuadId,
		XVphy_ChannelId ChId)
{
	u8 MRefClkDiv;
	u8 DrpEncode;

	if ((ChId >= XVPHY_CHANNEL_ID_CH1) && (ChId <= XVPHY_CHANNEL_ID_CH4)) {
		MRefClkDiv = InstancePtr->Quads[QuadId].Plls[XVPHY_CH2IDX(ChId)]
				.PllParams.MRefClkDiv;
	}
	else if ((ChId == XVPHY_CHANNEL_ID_CMN0) ||
			(ChId == XVPHY_CHANNEL_ID_CMN1)) {
		MRefClkDiv = InstancePtr->Quads[QuadId].Plls[XVPHY_CH2IDX(ChId)]
				.PllParams.MRefClkDiv;
	}
	else {
		MRefClkDiv = 0;
	}

	DrpEncode = XVphy_DrpEncodeQpllMCpllMN2(MRefClkDiv);

	return DrpEncode;
}
/*****************************************************************************/
/**
* This function will translate the configured M value to DRP encoding.
*
* @param	InstancePtr is a pointer to the XVphy core instance.
* @param	QuadId is the GT quad ID to operate on.
* @param	ChId is the channel ID to operate on.
*
* @return	The DRP encoding for M.
*
* @note		None.
*
******************************************************************************/
This function will translate the configured M value to DRP encoding.
This function will translate the configured M value to DRP encoding .
static u8 XVphy_MToDrpEncoding(XVphy *InstancePtr, u8 QuadId,
		XVphy_ChannelId ChId)
{
	u8 MRefClkDiv;
	u8 DrpEncode;
	if ((ChId >= XVPHY_CHANNEL_ID_CH1) && (ChId <= XVPHY_CHANNEL_ID_CH4)) {
		MRefClkDiv = InstancePtr->Quads[QuadId].Plls[XVPHY_CH2IDX(ChId)]
				.PllParams.MRefClkDiv;
	}
	else if ((ChId == XVPHY_CHANNEL_ID_CMN0) ||
			(ChId == XVPHY_CHANNEL_ID_CMN1)) {
		MRefClkDiv = InstancePtr->Quads[QuadId].Plls[XVPHY_CH2IDX(ChId)]
				.PllParams.MRefClkDiv;
	}
	else {
		MRefClkDiv = 0;
	}
	DrpEncode = XVphy_DrpEncodeQpllMCpllMN2(MRefClkDiv);
	return DrpEncode;
}
static u8 XVphy_MToDrpEncoding ( XVphy * InstancePtr , u8 QuadId , XVphy_ChannelId ChId ) { u8 MRefClkDiv ; u8 DrpEncode ; if ( ( ChId >= XVPHY_CHANNEL_ID_CH1 ) && ( ChId <= XVPHY_CHANNEL_ID_CH4 ) ) { MRefClkDiv = InstancePtr -> Quads [ QuadId ] . Plls [ XVPHY_CH2IDX ( ChId ) ] . PllParams . MRefClkDiv ; } else if ( ( ChId == XVPHY_CHANNEL_ID_CMN0 ) || ( ChId == XVPHY_CHANNEL_ID_CMN1 ) ) { MRefClkDiv = InstancePtr -> Quads [ QuadId ] . Plls [ XVPHY_CH2IDX ( ChId ) ] . PllParams . MRefClkDiv ; } else { MRefClkDiv = 0 ; } DrpEncode = XVphy_DrpEncodeQpllMCpllMN2 ( MRefClkDiv ) ; return DrpEncode ; }
This function will translate the configured M value to DRP encoding.
This function will translate the configured M value to DRP encoding .