Commit f89b9e1b authored by Leonard Crestez's avatar Leonard Crestez Committed by Stephen Boyd

clk: imx: Fix PLL_1416X not rounding rates

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: default avatarLeonard Crestez <leonard.crestez@nxp.com>
Fixes: 8646d4dc ("clk: imx: Add PLLs driver for imx8mm soc")
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent b3cf181c
...@@ -362,7 +362,7 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name, ...@@ -362,7 +362,7 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,
switch (pll_clk->type) { switch (pll_clk->type) {
case PLL_1416X: case PLL_1416X:
if (!pll->rate_table) if (!pll_clk->rate_table)
init.ops = &clk_pll1416x_min_ops; init.ops = &clk_pll1416x_min_ops;
else else
init.ops = &clk_pll1416x_ops; init.ops = &clk_pll1416x_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment