summaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorMichael Turquette <mturquette@linaro.org>2015-01-29 14:22:50 -0800
committerMichael Turquette <mturquette@linaro.org>2015-02-02 14:23:41 -0800
commitb09d6d99102504a929cfaba4cd0e07658d7f01d1 (patch)
tree57bf5300cd8920152daaa79875b3910700eb5170 /drivers/clk
parentc87ea8a8a0af8b76c1e4d1bd67ed7859c04477a7 (diff)
downloadblackbird-op-linux-b09d6d99102504a929cfaba4cd0e07658d7f01d1.tar.gz
blackbird-op-linux-b09d6d99102504a929cfaba4cd0e07658d7f01d1.zip
clk: remove clk-private.h
Private clock framework data structures should be private, surprisingly. Now that all platforms and drivers have been updated to remove static initializations of struct clk and struct clk_core objects and all references to clk-private.h have been removed we can move the definitions of these structures into drivers/clk/clk.c and delete the header. Additionally the ugly DEFINE_CLK macros have been removed. Those were used for static definitions of struct clk objects. That practice is no longer allowed. Finally __clk_init is staticized as it is no longer declared in any header. Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index d60c193b81aa..cdc1fa58e4f1 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -9,7 +9,7 @@
* Standard functionality for the common clock API. See Documentation/clk.txt
*/
-#include <linux/clk-private.h>
+#include <linux/clk-provider.h>
#include <linux/clk/clk-conf.h>
#include <linux/module.h>
#include <linux/mutex.h>
@@ -46,6 +46,43 @@ static unsigned long clk_core_round_rate_nolock(struct clk_core *clk,
unsigned long rate);
static struct clk_core *clk_core_lookup(const char *name);
+/*** private data structures ***/
+
+struct clk_core {
+ const char *name;
+ const struct clk_ops *ops;
+ struct clk_hw *hw;
+ struct module *owner;
+ struct clk_core *parent;
+ const char **parent_names;
+ struct clk_core **parents;
+ u8 num_parents;
+ u8 new_parent_index;
+ unsigned long rate;
+ unsigned long new_rate;
+ struct clk_core *new_parent;
+ struct clk_core *new_child;
+ unsigned long flags;
+ unsigned int enable_count;
+ unsigned int prepare_count;
+ unsigned long accuracy;
+ int phase;
+ struct hlist_head children;
+ struct hlist_node child_node;
+ struct hlist_node debug_node;
+ unsigned int notifier_count;
+#ifdef CONFIG_DEBUG_FS
+ struct dentry *dentry;
+#endif
+ struct kref ref;
+};
+
+struct clk {
+ struct clk_core *core;
+ const char *dev_id;
+ const char *con_id;
+};
+
/*** locking ***/
static void clk_prepare_lock(void)
{
@@ -1995,7 +2032,7 @@ int clk_get_phase(struct clk *clk)
* Initializes the lists in struct clk_core, queries the hardware for the
* parent and rate and sets them both.
*/
-int __clk_init(struct device *dev, struct clk *clk_user)
+static int __clk_init(struct device *dev, struct clk *clk_user)
{
int i, ret = 0;
struct clk_core *orphan;
OpenPOWER on IntegriCloud