]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
clk: meson: audio-divider is one based
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 19 Jun 2018 15:47:53 +0000 (17:47 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Thu, 21 Jun 2018 08:10:50 +0000 (10:10 +0200)
The audio divider is one based. This offset was mistakenly dropped from
recalc_rate() when migrating to clk_regmap.

Fixes: 88a4e1283681 ("clk: meson: migrate the audio divider clock to clk_regmap")
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/meson/clk-audio-divider.c

index 58f546e048073160e40bedf637894b189072b143..e4cf96ba704ed98ff2a277af75da8c7a3a5b8ee0 100644 (file)
@@ -51,7 +51,7 @@ static unsigned long audio_divider_recalc_rate(struct clk_hw *hw,
        struct meson_clk_audio_div_data *adiv = meson_clk_audio_div_data(clk);
        unsigned long divider;
 
-       divider = meson_parm_read(clk->map, &adiv->div);
+       divider = meson_parm_read(clk->map, &adiv->div) + 1;
 
        return DIV_ROUND_UP_ULL((u64)parent_rate, divider);
 }