Skip to content

Commit

Permalink
clk: meson: vid-pll-div: remove warning and return 0 on invalid config
Browse files Browse the repository at this point in the history
The vid_pll_div is a programmable fractional divider, but vendor gives a
limited of known configuration value and it's corresponding fraction.

Thus when at reset value (0) or unknown value, we cannot determine the
result rate.

The initial behaviour was to print a warning, but the warning triggers
at each boot and when the clock tree is refreshed.

This patch moves the print to debug and returns 0 instead of the
parent rate.

Fixes: 72dbb8c ("clk: meson: Add vid_pll divider driver")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lkml.kernel.org/r/20190327151348.27402-1-narmstrong@baylibre.com
  • Loading branch information
Neil Armstrong committed Mar 29, 2019
1 parent d6f987c commit 6620f45
Showing 1 changed file with 2 additions and 2 deletions.
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 6620f45

Please sign in to comment.