diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2011-02-23 12:37:41 -0500 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2011-02-28 15:40:05 -0500 |
commit | 2a52220c89e02423aa23e6b9fb6dc0c706465a82 (patch) | |
tree | 39a6e46c02ff983e1228c691cf06e3a7405db90e /arch/arm/mach-msm/clock.c | |
parent | 0693a317b609a5d31d29e26c4f28ea079d5477f4 (diff) |
msm: clock: Remove references to clk_ops_pcom
Not all devices use proc_comm and determining if a clock is local
vs. remote is fragile when done by comparing clk_ops pointers.
Instead, implement an is_local() function for all clk_ops to
determine if the clock is local. Doing this allows us to remove
the last references to clk_ops_pcom from clock.c and compile it
for targets with CONFIG_MSM_PROC_COMM=n.
We don't need to set the clk_ops at runtime until 7x30 local
clock detection comes in. Right now it's just complicating things
so just set the ops pointer statically.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/clock.c')
-rw-r--r-- | arch/arm/mach-msm/clock.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c index 8c2b4dd4a877..e00f6a040ad5 100644 --- a/arch/arm/mach-msm/clock.c +++ b/arch/arm/mach-msm/clock.c | |||
@@ -21,9 +21,6 @@ | |||
21 | #include <linux/pm_qos_params.h> | 21 | #include <linux/pm_qos_params.h> |
22 | 22 | ||
23 | #include "clock.h" | 23 | #include "clock.h" |
24 | #include "proc_comm.h" | ||
25 | #include "clock-7x30.h" | ||
26 | #include "clock-pcom.h" | ||
27 | 24 | ||
28 | static DEFINE_MUTEX(clocks_mutex); | 25 | static DEFINE_MUTEX(clocks_mutex); |
29 | static DEFINE_SPINLOCK(clocks_lock); | 26 | static DEFINE_SPINLOCK(clocks_lock); |
@@ -84,8 +81,6 @@ EXPORT_SYMBOL(clk_disable); | |||
84 | 81 | ||
85 | int clk_reset(struct clk *clk, enum clk_reset_action action) | 82 | int clk_reset(struct clk *clk, enum clk_reset_action action) |
86 | { | 83 | { |
87 | if (!clk->ops->reset) | ||
88 | clk->ops->reset = &pc_clk_reset; | ||
89 | return clk->ops->reset(clk->remote_id, action); | 84 | return clk->ops->reset(clk->remote_id, action); |
90 | } | 85 | } |
91 | EXPORT_SYMBOL(clk_reset); | 86 | EXPORT_SYMBOL(clk_reset); |
@@ -162,23 +157,13 @@ EXPORT_SYMBOL(clk_set_flags); | |||
162 | */ | 157 | */ |
163 | static struct clk *ebi1_clk; | 158 | static struct clk *ebi1_clk; |
164 | 159 | ||
165 | static void __init set_clock_ops(struct clk *clk) | ||
166 | { | ||
167 | if (!clk->ops) { | ||
168 | clk->ops = &clk_ops_pcom; | ||
169 | clk->id = clk->remote_id; | ||
170 | } | ||
171 | } | ||
172 | |||
173 | void __init msm_clock_init(struct clk *clock_tbl, unsigned num_clocks) | 160 | void __init msm_clock_init(struct clk *clock_tbl, unsigned num_clocks) |
174 | { | 161 | { |
175 | unsigned n; | 162 | unsigned n; |
176 | 163 | ||
177 | mutex_lock(&clocks_mutex); | 164 | mutex_lock(&clocks_mutex); |
178 | for (n = 0; n < num_clocks; n++) { | 165 | for (n = 0; n < num_clocks; n++) |
179 | set_clock_ops(&clock_tbl[n]); | ||
180 | list_add_tail(&clock_tbl[n].list, &clocks); | 166 | list_add_tail(&clock_tbl[n].list, &clocks); |
181 | } | ||
182 | mutex_unlock(&clocks_mutex); | 167 | mutex_unlock(&clocks_mutex); |
183 | 168 | ||
184 | ebi1_clk = clk_get(NULL, "ebi1_clk"); | 169 | ebi1_clk = clk_get(NULL, "ebi1_clk"); |