diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2016-08-24 08:32:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-31 05:02:12 -0600 |
commit | 03ca3d38640afba6695f9366ee16f2ab56a4c7e3 (patch) | |
tree | 347a11c6b6243b0c94f5df4bfa63408a3aedf204 | |
parent | 47e14015b33ca41f6ec233e0bc425954ee81f7e6 (diff) | |
download | lwn-03ca3d38640afba6695f9366ee16f2ab56a4c7e3.tar.gz lwn-03ca3d38640afba6695f9366ee16f2ab56a4c7e3.zip |
clk: core: Force setting the phase delay when no change
commit 3174b0c9a62bb3738b4a2a506b8a075d4430e353 upstream.
This patch reverts commit 023bd7166be0 ("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: Jean-Francois Moine <moinejf@free.fr>
Fixes: 023bd7166be0 ("clk: skip unnecessary set_phase if nothing to do")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/clk/clk.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index b7ae819780ac..2877a4ddeda2 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1908,10 +1908,6 @@ int clk_set_phase(struct clk *clk, int degrees) clk_prepare_lock(); - /* bail early if nothing to do */ - if (degrees == clk->core->phase) - goto out; - trace_clk_set_phase(clk->core, degrees); if (clk->core->ops->set_phase) @@ -1922,7 +1918,6 @@ int clk_set_phase(struct clk *clk, int degrees) if (!ret) clk->core->phase = degrees; -out: clk_prepare_unlock(); return ret; |