clk: meson: axg: add the fractional part of the fixed_pll
authorJerome Brunet <jbrunet@baylibre.com>
Fri, 19 Jan 2018 15:55:29 +0000 (16:55 +0100)
committerJerome Brunet <jbrunet@baylibre.com>
Mon, 12 Feb 2018 08:49:23 +0000 (09:49 +0100)
The fixed_pll also has a fractional part. On axg s400 board, without
this parameter, the calculated rate is off by ~8Mhz (0,4%). The fixed_pll
being the root of the peripheral clock tree, this error is propagated to
the rest of the clocks

Adding the definition of the parameter fixes the problem

Fixes: 78b4af312f91 ("clk: meson-axg: add clock controller drivers")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/meson/axg.c

index 8e37bbf305e98f070b3051daa9bcc6460052db95..a1ac0ff67e5fbf2dd008a77006f35cfb9483e81e 100644 (file)
@@ -37,6 +37,11 @@ static struct meson_clk_pll axg_fixed_pll = {
                .shift   = 16,
                .width   = 2,
        },
+       .frac = {
+               .reg_off = HHI_MPLL_CNTL2,
+               .shift   = 0,
+               .width   = 12,
+       },
        .lock = &meson_clk_lock,
        .hw.init = &(struct clk_init_data){
                .name = "fixed_pll",