aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock24xx.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-04 09:02:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-02 09:52:18 -0500
commit548d849574847b788fe846fe21a41386063be161 (patch)
tree6c2ac7379c376793368affab03e5202abd0f1efa /arch/arm/mach-omap2/clock24xx.c
parentdb8ac47cfccaafd3fa4c5c15320809d44f4fcef9 (diff)
[ARM] omap: introduce clock operations structure
Collect up all the common enable/disable clock operation functions into a separate operations structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r--arch/arm/mach-omap2/clock24xx.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index d382eb0184ac..866a618c4d8d 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -34,12 +34,16 @@
34 34
35#include "memory.h" 35#include "memory.h"
36#include "clock.h" 36#include "clock.h"
37#include "clock24xx.h"
38#include "prm.h" 37#include "prm.h"
39#include "prm-regbits-24xx.h" 38#include "prm-regbits-24xx.h"
40#include "cm.h" 39#include "cm.h"
41#include "cm-regbits-24xx.h" 40#include "cm-regbits-24xx.h"
42 41
42static const struct clkops clkops_oscck;
43static const struct clkops clkops_fixed;
44
45#include "clock24xx.h"
46
43/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */ 47/* CM_CLKEN_PLL.EN_{54,96}M_PLL options (24XX) */
44#define EN_APLL_STOPPED 0 48#define EN_APLL_STOPPED 0
45#define EN_APLL_LOCKED 3 49#define EN_APLL_LOCKED 3
@@ -96,6 +100,11 @@ static void omap2_disable_osc_ck(struct clk *clk)
96 OMAP24XX_PRCM_CLKSRC_CTRL); 100 OMAP24XX_PRCM_CLKSRC_CTRL);
97} 101}
98 102
103static const struct clkops clkops_oscck = {
104 .enable = &omap2_enable_osc_ck,
105 .disable = &omap2_disable_osc_ck,
106};
107
99#ifdef OLD_CK 108#ifdef OLD_CK
100/* Recalculate SYST_CLK */ 109/* Recalculate SYST_CLK */
101static void omap2_sys_clk_recalc(struct clk * clk) 110static void omap2_sys_clk_recalc(struct clk * clk)
@@ -149,6 +158,11 @@ static void omap2_clk_fixed_disable(struct clk *clk)
149 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); 158 cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN);
150} 159}
151 160
161static const struct clkops clkops_fixed = {
162 .enable = &omap2_clk_fixed_enable,
163 .disable = &omap2_clk_fixed_disable,
164};
165
152/* 166/*
153 * Uses the current prcm set to tell if a rate is valid. 167 * Uses the current prcm set to tell if a rate is valid.
154 * You can go slower, but not faster within a given rate set. 168 * You can go slower, but not faster within a given rate set.