diff options
author | Jerome Brunet | 2018-08-01 16:00:53 +0200 |
---|---|---|
committer | Jerome Brunet | 2018-09-26 12:02:00 +0200 |
commit | dd601dbc011e4eeda9e4c8c19ffe5b2fb33223dc (patch) | |
tree | 4a3ec158d243c98e47fdf5b11a50e2bf4483f69d /drivers/clk/meson/clkc.h | |
parent | clk: meson: clk-pll: remove od parameters (diff) | |
download | kernel-qcow2-linux-dd601dbc011e4eeda9e4c8c19ffe5b2fb33223dc.tar.gz kernel-qcow2-linux-dd601dbc011e4eeda9e4c8c19ffe5b2fb33223dc.tar.xz kernel-qcow2-linux-dd601dbc011e4eeda9e4c8c19ffe5b2fb33223dc.zip |
clk: meson: clk-pll: drop hard-coded rates from pll tables
Putting hard-coded rates inside the parameter tables assumes that
the parent is known and will never change. That's a big assumption
we should not make.
We have everything we need to recalculate the output rate using
the parent rate and the rest of the parameters. Let's do so and
drop the rates from the tables.
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/clkc.h')
-rw-r--r-- | drivers/clk/meson/clkc.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index a2245e857f70..6b96d55c047d 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -43,15 +43,13 @@ static inline void meson_parm_write(struct regmap *map, struct parm *p, } -struct pll_rate_table { - unsigned long rate; +struct pll_params_table { u16 m; u16 n; }; -#define PLL_RATE(_r, _m, _n) \ +#define PLL_PARAMS(_m, _n) \ { \ - .rate = (_r), \ .m = (_m), \ .n = (_n), \ } @@ -67,7 +65,7 @@ struct meson_clk_pll_data { struct parm rst; const struct reg_sequence *init_regs; unsigned int init_count; - const struct pll_rate_table *table; + const struct pll_params_table *table; u8 flags; }; |