Commit 03ca3d38 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Greg Kroah-Hartman

clk: core: Force setting the phase delay when no change

commit 3174b0c9 upstream.

This patch reverts commit 023bd716 ("clk: skip unnecessary
set_phase if nothing to do"), fixing two problems:

* in some SoCs, the hardware phase delay depends on the rate ratio of
  the clock and its parent. So, changing this ratio may imply to set
  new hardware values, even if the logical delay is the same.

* when the delay was the same as previously, an error was returned.
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Fixes: 023bd716 ("clk: skip unnecessary set_phase if nothing to do")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 47e14015
...@@ -1908,10 +1908,6 @@ int clk_set_phase(struct clk *clk, int degrees) ...@@ -1908,10 +1908,6 @@ int clk_set_phase(struct clk *clk, int degrees)
clk_prepare_lock(); clk_prepare_lock();
/* bail early if nothing to do */
if (degrees == clk->core->phase)
goto out;
trace_clk_set_phase(clk->core, degrees); trace_clk_set_phase(clk->core, degrees);
if (clk->core->ops->set_phase) if (clk->core->ops->set_phase)
...@@ -1922,7 +1918,6 @@ int clk_set_phase(struct clk *clk, int degrees) ...@@ -1922,7 +1918,6 @@ int clk_set_phase(struct clk *clk, int degrees)
if (!ret) if (!ret)
clk->core->phase = degrees; clk->core->phase = degrees;
out:
clk_prepare_unlock(); clk_prepare_unlock();
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment