From: Zdenko Pulitika <zdenko.pulitika@xxxxxxxxxx> Vco was calculated based on the current operating mode which makes no sense because .set_rate is setting operating mode. Instead, vco should be calculated using pll settings that are about to be set. Signed-off-by: Zdenko Pulitika <zdenko.pulitika@xxxxxxxxxx> Signed-off-by: Govindraj Raja <govindraj.raja@xxxxxxxxxx> --- drivers/clk/pistachio/clk-pll.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c index eb91748..5554fa4 100644 --- a/drivers/clk/pistachio/clk-pll.c +++ b/drivers/clk/pistachio/clk-pll.c @@ -207,13 +207,9 @@ static int pll_gf40lp_frac_set_rate(struct clk_hw *hw, unsigned long rate, if (!params || !params->refdiv) return -EINVAL; - /* get operating mode and calculate vco accordingly */ + /* calculate vco */ vco = params->fref; - if (pll_frac_get_mode(hw) == PLL_MODE_INT) - vco *= params->fbdiv << 24; - else - vco *= (params->fbdiv << 24) + params->frac; - + vco *= (params->fbdiv << 24) + params->frac; vco = div64_u64(vco, params->refdiv << 24); if (vco < MIN_VCO_FRAC_FRAC || vco > MAX_VCO_FRAC_FRAC) -- 1.9.1