Skip to content

Commit

Permalink
Merge tag 'meson-clk-fixes-for-5.1-v2' of https://github.com/BayLibre…
Browse files Browse the repository at this point in the history
…/clk-meson into clk-fixes

Pull more fixes for meson clocks from Neil Armstrong:
 - clk-pll: fix rate rounding fixing meson8b boot failure
 - vid-pll-div: fix recal_rate warning and return when invalid setting

* tag 'meson-clk-fixes-for-5.1-v2' of https://github.com/BayLibre/clk-meson:
  clk: meson: vid-pll-div: remove warning and return 0 on invalid config
  clk: meson: pll: fix rounding and setting a rate that matches precisely
  • Loading branch information
Stephen Boyd committed Mar 29, 2019
2 parents 22cf7c6 + 6620f45 commit 9f842ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/clk/meson/clk-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static bool meson_clk_pll_is_better(unsigned long rate,
return true;
} else {
/* Round down */
if (now < rate && best < now)
if (now <= rate && best < now)
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/clk/meson/vid-pll-div.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ static unsigned long meson_vid_pll_div_recalc_rate(struct clk_hw *hw,
div = _get_table_val(meson_parm_read(clk->map, &pll_div->val),
meson_parm_read(clk->map, &pll_div->sel));
if (!div || !div->divider) {
pr_info("%s: Invalid config value for vid_pll_div\n", __func__);
return parent_rate;
pr_debug("%s: Invalid config value for vid_pll_div\n", __func__);
return 0;
}

return DIV_ROUND_UP_ULL(parent_rate * div->multiplier, div->divider);
Expand Down

0 comments on commit 9f842ab

Please sign in to comment.