aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock3517.c
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-04-27 07:05:52 -0400
committerPaul Walmsley <paul@pwsan.com>2012-11-12 21:18:50 -0500
commit25f4214e388dda818765b670fb608f2e6467d877 (patch)
tree7d93133ad7ab52df724461bc903a9d49aba08ddf /arch/arm/mach-omap2/clock3517.c
parent13a5b6228679456cbc47a8d50e6580063caf8058 (diff)
ARM: OMAP3: clock: Cleanup !CONFIG_COMMON_CLK parts
Clean all #ifdef's added to OMAP3 clock code to make it COMMON clk ready, not that CONFIG_COMMON_CLK is enabled. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mike Turquette <mturquette@ti.com> [paul@pwsan.com: remove some ifdefs in mach-omap2/io.c] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock3517.c')
-rw-r--r--arch/arm/mach-omap2/clock3517.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/arch/arm/mach-omap2/clock3517.c b/arch/arm/mach-omap2/clock3517.c
index 467d8bc6b4aa..4d79ae2c0241 100644
--- a/arch/arm/mach-omap2/clock3517.c
+++ b/arch/arm/mach-omap2/clock3517.c
@@ -47,11 +47,7 @@
47 * in the enable register itsel at a bit offset of 4 from the enable 47 * in the enable register itsel at a bit offset of 4 from the enable
48 * bit. A value of 1 indicates that clock is enabled. 48 * bit. A value of 1 indicates that clock is enabled.
49 */ 49 */
50#ifdef CONFIG_COMMON_CLK
51static void am35xx_clk_find_idlest(struct clk_hw_omap *clk, 50static void am35xx_clk_find_idlest(struct clk_hw_omap *clk,
52#else
53static void am35xx_clk_find_idlest(struct clk *clk,
54#endif
55 void __iomem **idlest_reg, 51 void __iomem **idlest_reg,
56 u8 *idlest_bit, 52 u8 *idlest_bit,
57 u8 *idlest_val) 53 u8 *idlest_val)
@@ -75,13 +71,8 @@ static void am35xx_clk_find_idlest(struct clk *clk,
75 * associate this type of code with per-module data structures to 71 * associate this type of code with per-module data structures to
76 * avoid this issue, and remove the casts. No return value. 72 * avoid this issue, and remove the casts. No return value.
77 */ 73 */
78#ifdef CONFIG_COMMON_CLK
79static void am35xx_clk_find_companion(struct clk_hw_omap *clk, 74static void am35xx_clk_find_companion(struct clk_hw_omap *clk,
80 void __iomem **other_reg, 75 void __iomem **other_reg,
81#else
82static void am35xx_clk_find_companion(struct clk *clk,
83 void __iomem **other_reg,
84#endif
85 u8 *other_bit) 76 u8 *other_bit)
86{ 77{
87 *other_reg = (__force void __iomem *)(clk->enable_reg); 78 *other_reg = (__force void __iomem *)(clk->enable_reg);
@@ -90,19 +81,10 @@ static void am35xx_clk_find_companion(struct clk *clk,
90 else 81 else
91 *other_bit = clk->enable_bit - AM35XX_IPSS_ICK_FCK_OFFSET; 82 *other_bit = clk->enable_bit - AM35XX_IPSS_ICK_FCK_OFFSET;
92} 83}
93#ifdef CONFIG_COMMON_CLK
94const struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait = { 84const struct clk_hw_omap_ops clkhwops_am35xx_ipss_module_wait = {
95 .find_idlest = am35xx_clk_find_idlest, 85 .find_idlest = am35xx_clk_find_idlest,
96 .find_companion = am35xx_clk_find_companion, 86 .find_companion = am35xx_clk_find_companion,
97}; 87};
98#else
99const struct clkops clkops_am35xx_ipss_module_wait = {
100 .enable = omap2_dflt_clk_enable,
101 .disable = omap2_dflt_clk_disable,
102 .find_idlest = am35xx_clk_find_idlest,
103 .find_companion = am35xx_clk_find_companion,
104};
105#endif
106 88
107/** 89/**
108 * am35xx_clk_ipss_find_idlest - return CM_IDLEST info for IPSS 90 * am35xx_clk_ipss_find_idlest - return CM_IDLEST info for IPSS
@@ -115,11 +97,7 @@ const struct clkops clkops_am35xx_ipss_module_wait = {
115 * CM_{I,F}CLKEN bit. Pass back the correct info via @idlest_reg 97 * CM_{I,F}CLKEN bit. Pass back the correct info via @idlest_reg
116 * and @idlest_bit. No return value. 98 * and @idlest_bit. No return value.
117 */ 99 */
118#ifdef CONFIG_COMMON_CLK
119static void am35xx_clk_ipss_find_idlest(struct clk_hw_omap *clk, 100static void am35xx_clk_ipss_find_idlest(struct clk_hw_omap *clk,
120#else
121static void am35xx_clk_ipss_find_idlest(struct clk *clk,
122#endif
123 void __iomem **idlest_reg, 101 void __iomem **idlest_reg,
124 u8 *idlest_bit, 102 u8 *idlest_bit,
125 u8 *idlest_val) 103 u8 *idlest_val)
@@ -131,21 +109,10 @@ static void am35xx_clk_ipss_find_idlest(struct clk *clk,
131 *idlest_bit = AM35XX_ST_IPSS_SHIFT; 109 *idlest_bit = AM35XX_ST_IPSS_SHIFT;
132 *idlest_val = OMAP34XX_CM_IDLEST_VAL; 110 *idlest_val = OMAP34XX_CM_IDLEST_VAL;
133} 111}
134#ifdef CONFIG_COMMON_CLK 112
135const struct clk_hw_omap_ops clkhwops_am35xx_ipss_wait = { 113const struct clk_hw_omap_ops clkhwops_am35xx_ipss_wait = {
136 .allow_idle = omap2_clkt_iclk_allow_idle, 114 .allow_idle = omap2_clkt_iclk_allow_idle,
137 .deny_idle = omap2_clkt_iclk_deny_idle, 115 .deny_idle = omap2_clkt_iclk_deny_idle,
138 .find_idlest = am35xx_clk_ipss_find_idlest, 116 .find_idlest = am35xx_clk_ipss_find_idlest,
139 .find_companion = omap2_clk_dflt_find_companion, 117 .find_companion = omap2_clk_dflt_find_companion,
140}; 118};
141#else
142const struct clkops clkops_am35xx_ipss_wait = {
143 .enable = omap2_dflt_clk_enable,
144 .disable = omap2_dflt_clk_disable,
145 .find_idlest = am35xx_clk_ipss_find_idlest,
146 .find_companion = omap2_clk_dflt_find_companion,
147 .allow_idle = omap2_clkt_iclk_allow_idle,
148 .deny_idle = omap2_clkt_iclk_deny_idle,
149};
150#endif
151