Skip to content

Commit

Permalink
clk: imx: Fix PLL_1416X not rounding rates
Browse files Browse the repository at this point in the history
Code which initializes the "clk_init_data.ops" checks pll->rate_table
before that field is ever assigned to so it always picks
"clk_pll1416x_min_ops".

This breaks dynamic rate rounding for features such as cpufreq.

Fix by checking pll_clk->rate_table instead, here pll_clk refers to
the constant initialization data coming from per-soc clk driver.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Fixes: 8646d4d ("clk: imx: Add PLLs driver for imx8mm soc")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Leonard Crestez authored and Stephen Boyd committed Apr 12, 2019
1 parent b3cf181 commit f89b9e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/imx/clk-pll14xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,

switch (pll_clk->type) {
case PLL_1416X:
if (!pll->rate_table)
if (!pll_clk->rate_table)
init.ops = &clk_pll1416x_min_ops;
else
init.ops = &clk_pll1416x_ops;
Expand Down

0 comments on commit f89b9e1

Please sign in to comment.