aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/Kconfig
diff options
context:
space:
mode:
authorMike Turquette <mturquette@linaro.org>2012-03-16 02:11:19 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-16 16:35:01 -0400
commitb2476490ef11134b65544d8f062cff96c53e941b (patch)
tree35e341ae635a5608f6bef748d174d1dd5dcf8f9d /drivers/clk/Kconfig
parent69fe8a8e92ae6877167f222838bd0c92b35c7d72 (diff)
clk: introduce the common clock framework
The common clock framework defines a common struct clk useful across most platforms as well as an implementation of the clk api that drivers can use safely for managing clocks. The net result is consolidation of many different struct clk definitions and platform-specific clock framework implementations. This patch introduces the common struct clk, struct clk_ops and an implementation of the well-known clock api in include/clk/clk.h. Platforms may define their own hardware-specific clock structure and their own clock operation callbacks, so long as it wraps an instance of struct clk_hw. See Documentation/clk.txt for more details. This patch is based on the work of Jeremy Kerr, which in turn was based on the work of Ben Herrenschmidt. Signed-off-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Mike Turquette <mturquette@ti.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Rob Herring <rob.herring <at> calxeda.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Jeremy Kerr <jeremy.kerr@canonical.com> Cc: Arnd Bergman <arnd.bergmann@linaro.org> Cc: Paul Walmsley <paul@pwsan.com> Cc: Shawn Guo <shawn.guo@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Richard Zhao <richard.zhao@linaro.org> Cc: Saravana Kannan <skannan@codeaurora.org> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: Deepak Saxena <dsaxena@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/clk/Kconfig')
-rw-r--r--drivers/clk/Kconfig40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 9b3cd08cd0ed..2eaf17ed2791 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -8,3 +8,43 @@ config HAVE_CLK_PREPARE
8 8
9config HAVE_MACH_CLKDEV 9config HAVE_MACH_CLKDEV
10 bool 10 bool
11
12menuconfig COMMON_CLK
13 bool "Common Clock Framework"
14 select HAVE_CLK_PREPARE
15 ---help---
16 The common clock framework is a single definition of struct
17 clk, useful across many platforms, as well as an
18 implementation of the clock API in include/linux/clk.h.
19 Architectures utilizing the common struct clk should select
20 this automatically, but it may be necessary to manually select
21 this option for loadable modules requiring the common clock
22 framework.
23
24 If in doubt, say "N".
25
26if COMMON_CLK
27
28config COMMON_CLK_DISABLE_UNUSED
29 bool "Disabled unused clocks at boot"
30 depends on COMMON_CLK
31 ---help---
32 Traverses the entire clock tree and disables any clocks that are
33 enabled in hardware but have not been enabled by any device drivers.
34 This saves power and keeps the software model of the clock in line
35 with reality.
36
37 If in doubt, say "N".
38
39config COMMON_CLK_DEBUG
40 bool "DebugFS representation of clock tree"
41 depends on COMMON_CLK
42 select DEBUG_FS
43 ---help---
44 Creates a directory hierchy in debugfs for visualizing the clk
45 tree structure. Each directory contains read-only members
46 that export information specific to that clk node: clk_rate,
47 clk_flags, clk_prepare_count, clk_enable_count &
48 clk_notifier_count.
49
50endif