aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-01-17 18:27:09 -0500
committerTony Lindgren <tony@atomide.com>2006-01-17 18:27:09 -0500
commitf07adc591e6ff100773b93b643f58d9773df6e21 (patch)
tree78f20f5c07e211d0a5eb69620168fcfb1da0da7b /arch/arm/plat-omap
parent2664b25051f7ab96b22b199aa2f5ef6a949a4296 (diff)
ARM: OMAP: 1/4 Fix clock framework to use clk_enable/disable
This patch fixes OMAP clock framework to use clk_enable/disable instead of clk_use/unuse as specified in include/linux/clk.h. Instances of clk_use/unuse are renamed to clk_enable/disable, and references clk_use/unuse are removed. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/clock.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 7ebc5a29db8d..3c2bfc0efdaf 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -34,7 +34,7 @@ DEFINE_SPINLOCK(clockfw_lock);
34static struct clk_functions *arch_clock; 34static struct clk_functions *arch_clock;
35 35
36/*------------------------------------------------------------------------- 36/*-------------------------------------------------------------------------
37 * Standard clock functions defined in asm/hardware/clock.h 37 * Standard clock functions defined in include/linux/clk.h
38 *-------------------------------------------------------------------------*/ 38 *-------------------------------------------------------------------------*/
39 39
40struct clk * clk_get(struct device *dev, const char *id) 40struct clk * clk_get(struct device *dev, const char *id)
@@ -60,12 +60,8 @@ int clk_enable(struct clk *clk)
60 int ret = 0; 60 int ret = 0;
61 61
62 spin_lock_irqsave(&clockfw_lock, flags); 62 spin_lock_irqsave(&clockfw_lock, flags);
63 if (clk->enable) 63 if (arch_clock->clk_enable)
64 ret = clk->enable(clk);
65 else if (arch_clock->clk_enable)
66 ret = arch_clock->clk_enable(clk); 64 ret = arch_clock->clk_enable(clk);
67 else
68 printk(KERN_ERR "Could not enable clock %s\n", clk->name);
69 spin_unlock_irqrestore(&clockfw_lock, flags); 65 spin_unlock_irqrestore(&clockfw_lock, flags);
70 66
71 return ret; 67 return ret;
@@ -77,41 +73,12 @@ void clk_disable(struct clk *clk)
77 unsigned long flags; 73 unsigned long flags;
78 74
79 spin_lock_irqsave(&clockfw_lock, flags); 75 spin_lock_irqsave(&clockfw_lock, flags);
80 if (clk->disable) 76 if (arch_clock->clk_disable)
81 clk->disable(clk);
82 else if (arch_clock->clk_disable)
83 arch_clock->clk_disable(clk); 77 arch_clock->clk_disable(clk);
84 else
85 printk(KERN_ERR "Could not disable clock %s\n", clk->name);
86 spin_unlock_irqrestore(&clockfw_lock, flags); 78 spin_unlock_irqrestore(&clockfw_lock, flags);
87} 79}
88EXPORT_SYMBOL(clk_disable); 80EXPORT_SYMBOL(clk_disable);
89 81
90int clk_use(struct clk *clk)
91{
92 unsigned long flags;
93 int ret = 0;
94
95 spin_lock_irqsave(&clockfw_lock, flags);
96 if (arch_clock->clk_use)
97 ret = arch_clock->clk_use(clk);
98 spin_unlock_irqrestore(&clockfw_lock, flags);
99
100 return ret;
101}
102EXPORT_SYMBOL(clk_use);
103
104void clk_unuse(struct clk *clk)
105{
106 unsigned long flags;
107
108 spin_lock_irqsave(&clockfw_lock, flags);
109 if (arch_clock->clk_unuse)
110 arch_clock->clk_unuse(clk);
111 spin_unlock_irqrestore(&clockfw_lock, flags);
112}
113EXPORT_SYMBOL(clk_unuse);
114
115int clk_get_usecount(struct clk *clk) 82int clk_get_usecount(struct clk *clk)
116{ 83{
117 unsigned long flags; 84 unsigned long flags;
@@ -146,7 +113,7 @@ void clk_put(struct clk *clk)
146EXPORT_SYMBOL(clk_put); 113EXPORT_SYMBOL(clk_put);
147 114
148/*------------------------------------------------------------------------- 115/*-------------------------------------------------------------------------
149 * Optional clock functions defined in asm/hardware/clock.h 116 * Optional clock functions defined in include/linux/clk.h
150 *-------------------------------------------------------------------------*/ 117 *-------------------------------------------------------------------------*/
151 118
152long clk_round_rate(struct clk *clk, unsigned long rate) 119long clk_round_rate(struct clk *clk, unsigned long rate)