diff options
Diffstat (limited to 'arch/arm/mach-omap2/clkt2xxx_osc.c')
-rw-r--r-- | arch/arm/mach-omap2/clkt2xxx_osc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clkt2xxx_osc.c b/arch/arm/mach-omap2/clkt2xxx_osc.c index e1777371bb5e..395e0c1b9d0c 100644 --- a/arch/arm/mach-omap2/clkt2xxx_osc.c +++ b/arch/arm/mach-omap2/clkt2xxx_osc.c | |||
@@ -35,7 +35,11 @@ | |||
35 | * clk_enable/clk_disable()-based usecounting for osc_ck should be | 35 | * clk_enable/clk_disable()-based usecounting for osc_ck should be |
36 | * replaced with autoidle-based usecounting. | 36 | * replaced with autoidle-based usecounting. |
37 | */ | 37 | */ |
38 | #ifdef CONFIG_COMMON_CLK | ||
39 | int omap2_enable_osc_ck(struct clk_hw *clk) | ||
40 | #else | ||
38 | static int omap2_enable_osc_ck(struct clk *clk) | 41 | static int omap2_enable_osc_ck(struct clk *clk) |
42 | #endif | ||
39 | { | 43 | { |
40 | u32 pcc; | 44 | u32 pcc; |
41 | 45 | ||
@@ -53,7 +57,11 @@ static int omap2_enable_osc_ck(struct clk *clk) | |||
53 | * clk_enable/clk_disable()-based usecounting for osc_ck should be | 57 | * clk_enable/clk_disable()-based usecounting for osc_ck should be |
54 | * replaced with autoidle-based usecounting. | 58 | * replaced with autoidle-based usecounting. |
55 | */ | 59 | */ |
60 | #ifdef CONFIG_COMMON_CLK | ||
61 | void omap2_disable_osc_ck(struct clk_hw *clk) | ||
62 | #else | ||
56 | static void omap2_disable_osc_ck(struct clk *clk) | 63 | static void omap2_disable_osc_ck(struct clk *clk) |
64 | #endif | ||
57 | { | 65 | { |
58 | u32 pcc; | 66 | u32 pcc; |
59 | 67 | ||
@@ -62,12 +70,19 @@ static void omap2_disable_osc_ck(struct clk *clk) | |||
62 | __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); | 70 | __raw_writel(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl); |
63 | } | 71 | } |
64 | 72 | ||
73 | #ifndef CONFIG_COMMON_CLK | ||
65 | const struct clkops clkops_oscck = { | 74 | const struct clkops clkops_oscck = { |
66 | .enable = omap2_enable_osc_ck, | 75 | .enable = omap2_enable_osc_ck, |
67 | .disable = omap2_disable_osc_ck, | 76 | .disable = omap2_disable_osc_ck, |
68 | }; | 77 | }; |
78 | #endif | ||
69 | 79 | ||
80 | #ifdef CONFIG_COMMON_CLK | ||
81 | unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, | ||
82 | unsigned long parent_rate) | ||
83 | #else | ||
70 | unsigned long omap2_osc_clk_recalc(struct clk *clk) | 84 | unsigned long omap2_osc_clk_recalc(struct clk *clk) |
85 | #endif | ||
71 | { | 86 | { |
72 | return omap2xxx_get_apll_clkin() * omap2xxx_get_sysclkdiv(); | 87 | return omap2xxx_get_apll_clkin() * omap2xxx_get_sysclkdiv(); |
73 | } | 88 | } |