]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clk: meson: axg: let mpll clocks round closest
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 15 May 2018 16:36:52 +0000 (18:36 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Mon, 21 May 2018 09:31:59 +0000 (11:31 +0200)
Let the mpll dividers achieve the closest rate possible, even if
it means rounding the requested rate up.

This is done to improve the accuracy of the rates provided by these
plls to the audio subsystem

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/meson/axg.c

index 5f5d468c1efe6cf24f309beb88495b7fa9e86598..bd4dbc696b88fa6a4a7e692ab3c4d9a92634025a 100644 (file)
@@ -461,6 +461,7 @@ static struct clk_regmap axg_mpll0_div = {
                        .width   = 1,
                },
                .lock = &meson_clk_lock,
+               .flags = CLK_MESON_MPLL_ROUND_CLOSEST,
        },
        .hw.init = &(struct clk_init_data){
                .name = "mpll0_div",
@@ -507,6 +508,7 @@ static struct clk_regmap axg_mpll1_div = {
                        .width   = 1,
                },
                .lock = &meson_clk_lock,
+               .flags = CLK_MESON_MPLL_ROUND_CLOSEST,
        },
        .hw.init = &(struct clk_init_data){
                .name = "mpll1_div",
@@ -553,6 +555,7 @@ static struct clk_regmap axg_mpll2_div = {
                        .width   = 1,
                },
                .lock = &meson_clk_lock,
+               .flags = CLK_MESON_MPLL_ROUND_CLOSEST,
        },
        .hw.init = &(struct clk_init_data){
                .name = "mpll2_div",
@@ -599,6 +602,7 @@ static struct clk_regmap axg_mpll3_div = {
                        .width   = 1,
                },
                .lock = &meson_clk_lock,
+               .flags = CLK_MESON_MPLL_ROUND_CLOSEST,
        },
        .hw.init = &(struct clk_init_data){
                .name = "mpll3_div",