lib/sw_apps/zynqmp_pmufw/src/pm_pll.c
s32 PmPllGetParameterInt(PmPll* const pll, const u32 paramId, u32* const val)
{
	s32 status = XST_SUCCESS;
	PmPllParam* p;

	if (paramId >= ARRAY_SIZE(pllParams)) {
		status = XST_INVALID_PARAM;
		goto done;
	}

	p = &pllParams[paramId];
	*val = XPfw_Read32(pll->addr + p->regOffset) >> p->shift;
	*val &= MASK_OF_BITS(p->bits);

done:
	return status;
}
/**
 * PmPllGetParameterInt() - Get the PLL parameter value
 * @pll		PLL whose parameter should be get
 * @paramId	Parameter ID
 * @val		Location to store parameter value
 *
 * @return	Status of setting the parameter:
 *		XST_INVALID_PARAM if one of the given arguments is invalid
 *		XST_SUCCESS if parameter is set
 */
Get the PLL parameter value
@pll         PLL whose parameter should be get
@paramId     Parameter ID
@val         Location to store parameter value

@return      Status of setting the parameter:
XST_INVALID_PARAM if one of the given arguments is invalid
XST_SUCCESS if parameter is set
Get the PLL parameter value @pll PLL whose parameter should be get @paramId Parameter ID @val Location to store parameter value @return Status of setting the parameter : XST_INVALID_PARAM if one of the given arguments is invalid XST_SUCCESS if parameter is set
s32 PmPllGetParameterInt(PmPll* const pll, const u32 paramId, u32* const val)
{
	s32 status = XST_SUCCESS;
	PmPllParam* p;
	if (paramId >= ARRAY_SIZE(pllParams)) {
		status = XST_INVALID_PARAM;
		goto done;
	}
	p = &pllParams[paramId];
	*val = XPfw_Read32(pll->addr + p->regOffset) >> p->shift;
	*val &= MASK_OF_BITS(p->bits);
done:
	return status;
}
s32 PmPllGetParameterInt ( PmPll * const pll , const u32 paramId , u32 * const val ) { s32 status = XST_SUCCESS ; PmPllParam * p ; if ( paramId >= ARRAY_SIZE ( pllParams ) ) { status = XST_INVALID_PARAM ; goto done ; } p = & pllParams [ paramId ] ; * val = XPfw_Read32 ( pll -> addr + p -> regOffset ) >> p -> shift ; * val &= MASK_OF_BITS ( p -> bits ) ; done : return status ; }
PmPllGetParameterInt() - Get the PLL parameter value
 @pll         PLL whose parameter should be get
 @paramId     Parameter ID
 @val         Location to store parameter value
PmPllGetParameterInt () - Get the PLL parameter value @pll PLL whose parameter should be get @paramId Parameter ID @val Location to store parameter value