diff options
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 41 |
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); | |||
34 | static struct clk_functions *arch_clock; | 34 | static 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 | ||
40 | struct clk * clk_get(struct device *dev, const char *id) | 40 | struct 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 | } |
88 | EXPORT_SYMBOL(clk_disable); | 80 | EXPORT_SYMBOL(clk_disable); |
89 | 81 | ||
90 | int 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 | } | ||
102 | EXPORT_SYMBOL(clk_use); | ||
103 | |||
104 | void 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 | } | ||
113 | EXPORT_SYMBOL(clk_unuse); | ||
114 | |||
115 | int clk_get_usecount(struct clk *clk) | 82 | int 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) | |||
146 | EXPORT_SYMBOL(clk_put); | 113 | EXPORT_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 | ||
152 | long clk_round_rate(struct clk *clk, unsigned long rate) | 119 | long clk_round_rate(struct clk *clk, unsigned long rate) |