summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/clock.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2011-02-23 09:37:41 -0800
committerDavid Brown <davidb@codeaurora.org>2011-02-28 12:40:05 -0800
commit2a52220c89e02423aa23e6b9fb6dc0c706465a82 (patch)
tree39a6e46c02ff983e1228c691cf06e3a7405db90e /arch/arm/mach-msm/clock.c
parent0693a317b609a5d31d29e26c4f28ea079d5477f4 (diff)
downloadop-kernel-dev-2a52220c89e02423aa23e6b9fb6dc0c706465a82.zip
op-kernel-dev-2a52220c89e02423aa23e6b9fb6dc0c706465a82.tar.gz
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.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
index 8c2b4dd..e00f6a0 100644
--- a/arch/arm/mach-msm/clock.c
+++ b/arch/arm/mach-msm/clock.c
@@ -21,9 +21,6 @@
#include <linux/pm_qos_params.h>
#include "clock.h"
-#include "proc_comm.h"
-#include "clock-7x30.h"
-#include "clock-pcom.h"
static DEFINE_MUTEX(clocks_mutex);
static DEFINE_SPINLOCK(clocks_lock);
@@ -84,8 +81,6 @@ EXPORT_SYMBOL(clk_disable);
int clk_reset(struct clk *clk, enum clk_reset_action action)
{
- if (!clk->ops->reset)
- clk->ops->reset = &pc_clk_reset;
return clk->ops->reset(clk->remote_id, action);
}
EXPORT_SYMBOL(clk_reset);
@@ -162,23 +157,13 @@ EXPORT_SYMBOL(clk_set_flags);
*/
static struct clk *ebi1_clk;
-static void __init set_clock_ops(struct clk *clk)
-{
- if (!clk->ops) {
- clk->ops = &clk_ops_pcom;
- clk->id = clk->remote_id;
- }
-}
-
void __init msm_clock_init(struct clk *clock_tbl, unsigned num_clocks)
{
unsigned n;
mutex_lock(&clocks_mutex);
- for (n = 0; n < num_clocks; n++) {
- set_clock_ops(&clock_tbl[n]);
+ for (n = 0; n < num_clocks; n++)
list_add_tail(&clock_tbl[n].list, &clocks);
- }
mutex_unlock(&clocks_mutex);
ebi1_clk = clk_get(NULL, "ebi1_clk");
OpenPOWER on IntegriCloud