aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2015-05-11 06:20:06 -0400
committerStephen Boyd <sboyd@codeaurora.org>2015-05-13 15:32:51 -0400
commit42801ca46719b189d4090b76268e6db90fc01e3c (patch)
treea124407b0e4a74ee332ff2c4fc887c077f938c9a
parentdbc3976d9123a00925e3c9893b3f40f58f82636c (diff)
clk: Update docs after removal of clk-private.h
Currently Documentation/clk.txt describes an obsolete techinique to statically define struct clk objects. This capability was removed by b09d6d991025("clk: remove clk-private.h") and is no longer supported. The documentation describing the feature should be removed. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Michael Turquette <mturquette@linaro.org> Cc: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--Documentation/clk.txt27
1 files changed, 2 insertions, 25 deletions
diff --git a/Documentation/clk.txt b/Documentation/clk.txt
index 0e4f90aa1c13..f463bdc37f88 100644
--- a/Documentation/clk.txt
+++ b/Documentation/clk.txt
@@ -230,30 +230,7 @@ clk_register(...)
230 230
231See the basic clock types in drivers/clk/clk-*.c for examples. 231See the basic clock types in drivers/clk/clk-*.c for examples.
232 232
233 Part 5 - static initialization of clock data 233 Part 5 - Disabling clock gating of unused clocks
234
235For platforms with many clocks (often numbering into the hundreds) it
236may be desirable to statically initialize some clock data. This
237presents a problem since the definition of struct clk should be hidden
238from everyone except for the clock core in drivers/clk/clk.c.
239
240To get around this problem struct clk's definition is exposed in
241include/linux/clk-private.h along with some macros for more easily
242initializing instances of the basic clock types. These clocks must
243still be initialized with the common clock framework via a call to
244__clk_init.
245
246clk-private.h must NEVER be included by code which implements struct
247clk_ops callbacks, nor must it be included by any logic which pokes
248around inside of struct clk at run-time. To do so is a layering
249violation.
250
251To better enforce this policy, always follow this simple rule: any
252statically initialized clock data MUST be defined in a separate file
253from the logic that implements its ops. Basically separate the logic
254from the data and all is well.
255
256 Part 6 - Disabling clock gating of unused clocks
257 234
258Sometimes during development it can be useful to be able to bypass the 235Sometimes during development it can be useful to be able to bypass the
259default disabling of unused clocks. For example, if drivers aren't enabling 236default disabling of unused clocks. For example, if drivers aren't enabling
@@ -264,7 +241,7 @@ are sorted out.
264To bypass this disabling, include "clk_ignore_unused" in the bootargs to the 241To bypass this disabling, include "clk_ignore_unused" in the bootargs to the
265kernel. 242kernel.
266 243
267 Part 7 - Locking 244 Part 6 - Locking
268 245
269The common clock framework uses two global locks, the prepare lock and the 246The common clock framework uses two global locks, the prepare lock and the
270enable lock. 247enable lock.