]> git.baikalelectronics.ru Git - kernel.git/commit
clk: meson: pll: fix rounding and setting a rate that matches precisely
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 24 Mar 2019 16:43:27 +0000 (17:43 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 25 Mar 2019 12:18:09 +0000 (13:18 +0100)
commit2f85e92f478d3087d38bf849264a44c44574a47c
treea50f07f47d6748c8ea904b52780ee40c84b650e9
parentd7465ebbadf14a0d6852e51efb004786c650b098
clk: meson: pll: fix rounding and setting a rate that matches precisely

Make meson_clk_pll_is_better() consider a rate that precisely matches
the requested rate to be better than any previous rate (which was
smaller than the current).

Prior to commit 958c2571acea7b ("clk: meson: pll: update driver for the
g12a") meson_clk_get_pll_settings() returned early (before calling
meson_clk_pll_is_better()) if the rate from the current iteration
matches the requested rate precisely. After this commit
meson_clk_pll_is_better() is called unconditionally. This requires
meson_clk_pll_is_better() to work with the case where "now == rate".

This fixes a hang during boot on Meson8b / Odroid-C1 for me.

Fixes: 958c2571acea7b ("clk: meson: pll: update driver for the g12a")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lkml.kernel.org/r/20190324164327.22590-2-martin.blumenstingl@googlemail.com
drivers/clk/meson/clk-pll.c