aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clkt2xxx_apll.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-04-27 06:29:32 -0400
committerPaul Walmsley <paul@pwsan.com>2012-11-12 21:10:18 -0500
commited1ebc4948fdfe4c68865e5543b4a68e5a55973b (patch)
tree6d781e2833bdd91472f3a86e38eb4a8ae4e2b379 /arch/arm/mach-omap2/clkt2xxx_apll.c
parentb4777a21381fd1f87be8c606a616b7f97f485d2b (diff)
ARM: OMAP2: clock: Convert to common clk
Convert all OMAP2 specific platform files to use COMMON clk and keep all the changes under the CONFIG_COMMON_CLK macro check so it does not break any existing code. At a later point switch to COMMON clk and get rid of all old/legacy code. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mike Turquette <mturquette@ti.com> [paul@pwsan.com: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clkt2xxx_apll.c')
-rw-r--r--arch/arm/mach-omap2/clkt2xxx_apll.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c
index 8c5b13e7ee61..1bd15275dbf9 100644
--- a/arch/arm/mach-omap2/clkt2xxx_apll.c
+++ b/arch/arm/mach-omap2/clkt2xxx_apll.c
@@ -38,48 +38,90 @@
38 38
39/* Private functions */ 39/* Private functions */
40 40
41#ifdef CONFIG_COMMON_CLK
42int omap2_clk_apll96_enable(struct clk_hw *hw)
43#else
41static int _apll96_enable(struct clk *clk) 44static int _apll96_enable(struct clk *clk)
45#endif
42{ 46{
43 return omap2xxx_cm_apll96_enable(); 47 return omap2xxx_cm_apll96_enable();
44} 48}
45 49
50#ifdef CONFIG_COMMON_CLK
51int omap2_clk_apll54_enable(struct clk_hw *hw)
52#else
46static int _apll54_enable(struct clk *clk) 53static int _apll54_enable(struct clk *clk)
54#endif
47{ 55{
48 return omap2xxx_cm_apll54_enable(); 56 return omap2xxx_cm_apll54_enable();
49} 57}
50 58
59#ifdef CONFIG_COMMON_CLK
60static void _apll96_allow_idle(struct clk_hw_omap *clk)
61#else
51static void _apll96_allow_idle(struct clk *clk) 62static void _apll96_allow_idle(struct clk *clk)
63#endif
52{ 64{
53 omap2xxx_cm_set_apll96_auto_low_power_stop(); 65 omap2xxx_cm_set_apll96_auto_low_power_stop();
54} 66}
55 67
68#ifdef CONFIG_COMMON_CLK
69static void _apll96_deny_idle(struct clk_hw_omap *clk)
70#else
56static void _apll96_deny_idle(struct clk *clk) 71static void _apll96_deny_idle(struct clk *clk)
72#endif
57{ 73{
58 omap2xxx_cm_set_apll96_disable_autoidle(); 74 omap2xxx_cm_set_apll96_disable_autoidle();
59} 75}
60 76
77#ifdef CONFIG_COMMON_CLK
78static void _apll54_allow_idle(struct clk_hw_omap *clk)
79#else
61static void _apll54_allow_idle(struct clk *clk) 80static void _apll54_allow_idle(struct clk *clk)
81#endif
62{ 82{
63 omap2xxx_cm_set_apll54_auto_low_power_stop(); 83 omap2xxx_cm_set_apll54_auto_low_power_stop();
64} 84}
65 85
86#ifdef CONFIG_COMMON_CLK
87static void _apll54_deny_idle(struct clk_hw_omap *clk)
88#else
66static void _apll54_deny_idle(struct clk *clk) 89static void _apll54_deny_idle(struct clk *clk)
90#endif
67{ 91{
68 omap2xxx_cm_set_apll54_disable_autoidle(); 92 omap2xxx_cm_set_apll54_disable_autoidle();
69} 93}
70 94
95#ifdef CONFIG_COMMON_CLK
96void omap2_clk_apll96_disable(struct clk_hw *hw)
97#else
71static void _apll96_disable(struct clk *clk) 98static void _apll96_disable(struct clk *clk)
99#endif
72{ 100{
73 omap2xxx_cm_apll96_disable(); 101 omap2xxx_cm_apll96_disable();
74} 102}
75 103
104#ifdef CONFIG_COMMON_CLK
105void omap2_clk_apll54_disable(struct clk_hw *hw)
106#else
76static void _apll54_disable(struct clk *clk) 107static void _apll54_disable(struct clk *clk)
108#endif
77{ 109{
78 omap2xxx_cm_apll54_disable(); 110 omap2xxx_cm_apll54_disable();
79} 111}
80 112
81/* Public data */ 113/* Public data */
114#ifdef CONFIG_COMMON_CLK
115const struct clk_hw_omap_ops clkhwops_apll54 = {
116 .allow_idle = _apll54_allow_idle,
117 .deny_idle = _apll54_deny_idle,
118};
82 119
120const struct clk_hw_omap_ops clkhwops_apll96 = {
121 .allow_idle = _apll96_allow_idle,
122 .deny_idle = _apll96_deny_idle,
123};
124#else
83const struct clkops clkops_apll96 = { 125const struct clkops clkops_apll96 = {
84 .enable = _apll96_enable, 126 .enable = _apll96_enable,
85 .disable = _apll96_disable, 127 .disable = _apll96_disable,
@@ -93,6 +135,7 @@ const struct clkops clkops_apll54 = {
93 .allow_idle = _apll54_allow_idle, 135 .allow_idle = _apll54_allow_idle,
94 .deny_idle = _apll54_deny_idle, 136 .deny_idle = _apll54_deny_idle,
95}; 137};
138#endif
96 139
97/* Public functions */ 140/* Public functions */
98 141