plat/xilinx/zynqmp/pm_service/pm_api_clock.c
/**
 * pm_api_clock_setdivider - Set the clock divider for given id
 * @clock_id	Id of the clock
 * @divider	Divider value
 *
 * This function is used by master to set divider for any clock
 * to achieve desired rate.
 *
 * Return: Returns status, either success or error+reason.
 */
Set the clock divider for given id
@clock_id    Id of the clock
@divider     Divider value

This function is used by master to set divider for any clock
to achieve desired rate.

Returns status, either success or error+reason.
Set the clock divider for given id @clock_id Id of the clock @divider Divider value This function is used by master to set divider for any clock to achieve desired rate . Returns status either success or error + reason .
enum pm_ret_status pm_api_clock_setdivider(unsigned int clock_id,
					   unsigned int divider)
{
	enum pm_ret_status ret;
	if (!pm_clock_valid(clock_id))
		return PM_RET_ERROR_ARGS;
	if (pm_clock_type(clock_id) != CLK_TYPE_OUTPUT)
		return PM_RET_ERROR_NOTSUPPORTED;
	if (ISPLL(clock_id))
		ret = pm_api_pll_set_divider(clock_id, divider);
	else
		ret = pm_api_clk_set_divider(clock_id, divider);
	return ret;
}
enum pm_ret_status pm_api_clock_setdivider ( unsigned int clock_id , unsigned int divider ) { enum pm_ret_status ret ; if ( ! pm_clock_valid ( clock_id ) ) return PM_RET_ERROR_ARGS ; if ( pm_clock_type ( clock_id ) != CLK_TYPE_OUTPUT ) return PM_RET_ERROR_NOTSUPPORTED ; if ( ISPLL ( clock_id ) ) ret = pm_api_pll_set_divider ( clock_id , divider ) ; else ret = pm_api_clk_set_divider ( clock_id , divider ) ; return ret ; }
pm_api_clock_setdivider - Set the clock divider for given id
 @clock_id    Id of the clock
 @divider     Divider value
pm_api_clock_setdivider - Set the clock divider for given id @clock_id Id of the clock @divider Divider value