All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: Handle CLK_GET_RATE_NOCACHE flag in clk_set_rate()
@ 2013-06-21 13:07 ` Sylwester Nawrocki
  0 siblings, 0 replies; 5+ messages in thread
From: Sylwester Nawrocki @ 2013-06-21 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

If a clock has CLK_GET_RATE_NOCACHE flag set the rate needs to
be recalculated, rather than referencing the cached value.

Currently cached clk->rate is compared with new value to see if
anything needs to be done in clk_set_rate(). This may cause required
clock controller registers update to not happen when same clock
frequency value is being set subsequently.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/clk/clk.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 1144e8c..ffa304e 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1215,6 +1215,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
 	/* prevent racing with updates to the clock topology */
 	clk_prepare_lock();

+	if (clk->flags & CLK_GET_RATE_NOCACHE)
+		__clk_recalc_rates(clk, 0);
+
 	/* bail early if nothing to do */
 	if (rate == clk->rate)
 		goto out;
--
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-24 18:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-21 13:07 [PATCH] clk: Handle CLK_GET_RATE_NOCACHE flag in clk_set_rate() Sylwester Nawrocki
2013-06-21 13:07 ` Sylwester Nawrocki
2013-06-21 16:16 ` Mike Turquette
2013-06-24 18:42   ` Sylwester Nawrocki
2013-06-24 18:42     ` Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.