XilinxProcessorIPLib/drivers/avbuf/src/xavbuf_clk.c
static void XAVBuf_PllInitialize(XAVBuf_Pll *PllInstancePtr,
				     u8 Pll, u8 CrossDomain, u8 ExtDividerCnt)
{
	/* Instantiate input frequency. */
	PllInstancePtr->InputRefClk = XAVBUF_Pss_Ref_Clk;
	PllInstancePtr->RefClkFreqhz = XAVBUF_INPUT_REF_CLK;
	/* Turn on internal Divider*/
	PllInstancePtr->Divider = 1;
	PllInstancePtr->Pll = Pll;
	PllInstancePtr->ExtDividerCnt = ExtDividerCnt;

	/* Check if CrossDomain is requested*/
	if (CrossDomain)
		PllInstancePtr->DomainSwitchDiv = 6;
	else
		PllInstancePtr->DomainSwitchDiv = 1;
	/* Check where PLL falls*/
	if (Pll > 2) {
		PllInstancePtr->Fpd = 0;
		PllInstancePtr->BaseAddress = XAVBUF_CLK_LPD_BASEADDR;
		PllInstancePtr->Offset = XAVBUF_LPD_CTRL_OFFSET;
	} else {
		PllInstancePtr->Fpd = 1;
		PllInstancePtr->BaseAddress = XAVBUF_CLK_FPD_BASEADDR;
		PllInstancePtr->Offset = XAVBUF_FPD_CTRL_OFFSET;
	}

}
/******************************************************************************/
/**
 * This function initializes the parameters required to configure PLL.
 *
 * @param	PllInstancePtr is pointer to the XAVBuf_Pll instance.
 * @param	Pll is the PLL chosen to be configured.
 * @param	Pll is the PLL chosen to be configured.
 * @param	CrossDomain is the bool which is used to mention if the PLL
 *		outputs in other domain.
 * @param	ExtDividerCnt is number of external divider out of VCO.
 *
 * @return	XST_SUCCESS if PLL is configured without an error.
 *		XST_FAILURE otherwise.
 *
 * @note	In order to avoid floating point usage we have a 16bit
 *		fractional fixed point arithmetic implementation
 *
*******************************************************************************/
This function initializes the parameters required to configure PLL.
@param       PllInstancePtr is pointer to the XAVBuf_Pll instance.
@param       Pll is the PLL chosen to be configured.
@param       Pll is the PLL chosen to be configured.
@param       CrossDomain is the bool which is used to mention if the PLL
outputs in other domain.
@param       ExtDividerCnt is number of external divider out of VCO.

@return      XST_SUCCESS if PLL is configured without an error.

@note        In order to avoid floating point usage we have a 16bit
fractional fixed point arithmetic implementation
This function initializes the parameters required to configure PLL . @param PllInstancePtr is pointer to the XAVBuf_Pll instance . @param Pll is the PLL chosen to be configured . @param Pll is the PLL chosen to be configured . @param CrossDomain is the bool which is used to mention if the PLL outputs in other domain . @param ExtDividerCnt is number of external divider out of VCO . @return XST_SUCCESS if PLL is configured without an error . @note In order to avoid floating point usage we have a 16bit fractional fixed point arithmetic implementation
static void XAVBuf_PllInitialize(XAVBuf_Pll *PllInstancePtr,
				     u8 Pll, u8 CrossDomain, u8 ExtDividerCnt)
{
	PllInstancePtr->InputRefClk = XAVBUF_Pss_Ref_Clk;
	PllInstancePtr->RefClkFreqhz = XAVBUF_INPUT_REF_CLK;
	PllInstancePtr->Divider = 1;
	PllInstancePtr->Pll = Pll;
	PllInstancePtr->ExtDividerCnt = ExtDividerCnt;
	if (CrossDomain)
		PllInstancePtr->DomainSwitchDiv = 6;
	else
		PllInstancePtr->DomainSwitchDiv = 1;
	if (Pll > 2) {
		PllInstancePtr->Fpd = 0;
		PllInstancePtr->BaseAddress = XAVBUF_CLK_LPD_BASEADDR;
		PllInstancePtr->Offset = XAVBUF_LPD_CTRL_OFFSET;
	} else {
		PllInstancePtr->Fpd = 1;
		PllInstancePtr->BaseAddress = XAVBUF_CLK_FPD_BASEADDR;
		PllInstancePtr->Offset = XAVBUF_FPD_CTRL_OFFSET;
	}
}
static void XAVBuf_PllInitialize ( XAVBuf_Pll * PllInstancePtr , u8 Pll , u8 CrossDomain , u8 ExtDividerCnt ) { PllInstancePtr -> InputRefClk = XAVBUF_Pss_Ref_Clk ; PllInstancePtr -> RefClkFreqhz = XAVBUF_INPUT_REF_CLK ; PllInstancePtr -> Divider = 1 ; PllInstancePtr -> Pll = Pll ; PllInstancePtr -> ExtDividerCnt = ExtDividerCnt ; if ( CrossDomain ) PllInstancePtr -> DomainSwitchDiv = 6 ; else PllInstancePtr -> DomainSwitchDiv = 1 ; if ( Pll > 2 ) { PllInstancePtr -> Fpd = 0 ; PllInstancePtr -> BaseAddress = XAVBUF_CLK_LPD_BASEADDR ; PllInstancePtr -> Offset = XAVBUF_LPD_CTRL_OFFSET ; } else { PllInstancePtr -> Fpd = 1 ; PllInstancePtr -> BaseAddress = XAVBUF_CLK_FPD_BASEADDR ; PllInstancePtr -> Offset = XAVBUF_FPD_CTRL_OFFSET ; } }
This function initializes the parameters required to configure PLL.
This function initializes the parameters required to configure PLL .
/* Instantiate input frequency. */ /* Turn on internal Divider*/ /* Check if CrossDomain is requested*/ /* Check where PLL falls*/