summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-06-01 14:02:47 +0530
committerMike Turquette <mturquette@linaro.org>2012-07-11 15:36:43 -0700
commitf7d8caadfd2813cbada82ce9041b13c38e8e5282 (patch)
tree0daf2b7e7d16765c5d7b37afa935776e7358c7a3 /include/linux
parent357c3f0a6c7613f7230fcaf1eb16190ed2a4b0af (diff)
downloadlinux-stable-f7d8caadfd2813cbada82ce9041b13c38e8e5282.tar.gz
linux-stable-f7d8caadfd2813cbada82ce9041b13c38e8e5282.tar.bz2
linux-stable-f7d8caadfd2813cbada82ce9041b13c38e8e5282.zip
clk: Add CLK_IS_BASIC flag to identify basic clocks
Most platforms end up using a mix of basic clock types and some which use clk_hw_foo struct for filling in custom platform information when the clocks don't fit into basic types supported. In platform code, its useful to know if a clock is using a basic type or clk_hw_foo, which helps platforms know if they can safely use to_clk_hw_foo to derive the clk_hw_foo pointer from clk_hw. Mark all basic clocks with a CLK_IS_BASIC flag. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clk-private.h2
-rw-r--r--include/linux/clk-provider.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index cc9972d1429c..9c7f5807824b 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -64,7 +64,7 @@ struct clk {
.parent_names = _parent_names, \
.num_parents = ARRAY_SIZE(_parent_names), \
.parents = _parents, \
- .flags = _flags, \
+ .flags = _flags | CLK_IS_BASIC, \
}
#define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate, \
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 79caee9f1489..0236f58f3e65 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -25,6 +25,7 @@
#define CLK_SET_RATE_PARENT BIT(2) /* propagate rate change up one level */
#define CLK_IGNORE_UNUSED BIT(3) /* do not gate even if unused */
#define CLK_IS_ROOT BIT(4) /* root clk, has no parent */
+#define CLK_IS_BASIC BIT(5) /* Basic clk, can't do a to_clk_foo() */
struct clk_hw;