plat/xilinx/zynqmp/pm_service/pm_api_clock.c
/**
 * pm_ioctl_get_pll_mode() -  Get PLL mode
 * @pll     PLL id
 * @mode    Mode fraction/integar
 *
 * This function returns current PLL mode.
 *
 * @return      Returns status, either success or error+reason
 */
Get PLL mode
@pll     PLL id
@mode    Mode fraction/integar

This function returns current PLL mode.

@return      Returns status, either success or error+reason
Get PLL mode @pll PLL id @mode Mode fraction / integar This function returns current PLL mode . @return Returns status either success or error + reason
enum pm_ret_status pm_api_clk_get_pll_mode(unsigned int pll,
					   unsigned int *mode)
{
	enum pm_ret_status ret = PM_RET_SUCCESS;
	unsigned int val, reg;
	if (!pm_clock_valid(pll))
		return PM_RET_ERROR_ARGS;
	if (pm_clock_type(pll) != CLK_TYPE_OUTPUT)
		return PM_RET_ERROR_NOTSUPPORTED;
	if (!ISPLL(pll))
		return PM_RET_ERROR_NOTSUPPORTED;
	reg = clocks[pll].control_reg + PLL_FRAC_OFFSET;
	ret = pm_mmio_read(reg, &val);
	val = val & PLL_FRAC_MODE_MASK;
	if (val == 0)
		*mode = PLL_INT_MODE;
	else
		*mode = PLL_FRAC_MODE;
	return ret;
}
enum pm_ret_status pm_api_clk_get_pll_mode ( unsigned int pll , unsigned int * mode ) { enum pm_ret_status ret = PM_RET_SUCCESS ; unsigned int val , reg ; if ( ! pm_clock_valid ( pll ) ) return PM_RET_ERROR_ARGS ; if ( pm_clock_type ( pll ) != CLK_TYPE_OUTPUT ) return PM_RET_ERROR_NOTSUPPORTED ; if ( ! ISPLL ( pll ) ) return PM_RET_ERROR_NOTSUPPORTED ; reg = clocks [ pll ] . control_reg + PLL_FRAC_OFFSET ; ret = pm_mmio_read ( reg , & val ) ; val = val & PLL_FRAC_MODE_MASK ; if ( val == 0 ) * mode = PLL_INT_MODE ; else * mode = PLL_FRAC_MODE ; return ret ; }
pm_ioctl_get_pll_mode() -  Get PLL mode
 @pll     PLL id
 @mode    Mode fraction/integar
pm_ioctl_get_pll_mode () - Get PLL mode @pll PLL id @mode Mode fraction / integar