]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: imx: Fix PLL_1416X not rounding rates
authorLeonard Crestez <leonard.crestez@nxp.com>
Fri, 12 Apr 2019 14:10:03 +0000 (14:10 +0000)
committerStephen Boyd <sboyd@kernel.org>
Fri, 12 Apr 2019 21:21:43 +0000 (14:21 -0700)
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: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/imx/clk-pll14xx.c

index 1acfa3e3cfb401667fbb19666f1aac2add081826..113d71042199b3d3599da84df07e932b1c7902a9 100644 (file)
@@ -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;