diff options
author | Paul Walmsley <paul@pwsan.com> | 2009-12-08 18:29:37 -0500 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-12-11 19:00:40 -0500 |
commit | 6f62b58dd4e697a23a308f5b77781394949d333e (patch) | |
tree | d044429e3655732e47bd3458b95ee8bc1c220929 /arch/arm/mach-omap1 | |
parent | d8a944582da1a4d29a1487ff7f435643505a12a0 (diff) |
OMAP1 clock: convert test in disable_unused() to use ENABLE_ON_INIT
mach-omap1/clock.c:omap1_clk_disable_unused() contains a test that
assumes that the clock structures are available in the file's
namespace. After a following patch, this will no longer be the case.
So we need to reimplement that test. It turns out that we already
have a facility in the clock framework to handle this case - the
ENABLE_ON_INIT flag - used on OMAP2/3. Remove the offending test and
mark the clocks that it was intended to catch as ENABLE_ON_INIT.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap1/clock.h | 17 |
2 files changed, 16 insertions, 12 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index e006493fe6e3..26a887ccda7b 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -718,17 +718,6 @@ static void __init omap1_clk_disable_unused(struct clk *clk) | |||
718 | if ((regval32 & (1 << clk->enable_bit)) == 0) | 718 | if ((regval32 & (1 << clk->enable_bit)) == 0) |
719 | return; | 719 | return; |
720 | 720 | ||
721 | /* FIXME: This clock seems to be necessary but no-one | ||
722 | * has asked for its activation. */ | ||
723 | if (clk == &tc2_ck /* FIX: pm.c (SRAM), CCP, Camera */ | ||
724 | || clk == &ck_dpll1out.clk /* FIX: SoSSI, SSR */ | ||
725 | || clk == &arm_gpio_ck /* FIX: GPIO code for 1510 */ | ||
726 | ) { | ||
727 | printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n", | ||
728 | clk->name); | ||
729 | return; | ||
730 | } | ||
731 | |||
732 | printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name); | 721 | printk(KERN_INFO "Disabling unused clock \"%s\"... ", clk->name); |
733 | clk->ops->disable(clk); | 722 | clk->ops->disable(clk); |
734 | printk(" done\n"); | 723 | printk(" done\n"); |
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index 29ffa97dc7f3..70195cad7610 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h | |||
@@ -157,12 +157,17 @@ static struct clk ck_dpll1 = { | |||
157 | .parent = &ck_ref, | 157 | .parent = &ck_ref, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | /* | ||
161 | * FIXME: This clock seems to be necessary but no-one has asked for its | ||
162 | * activation. [ FIX: SoSSI, SSR ] | ||
163 | */ | ||
160 | static struct arm_idlect1_clk ck_dpll1out = { | 164 | static struct arm_idlect1_clk ck_dpll1out = { |
161 | .clk = { | 165 | .clk = { |
162 | .name = "ck_dpll1out", | 166 | .name = "ck_dpll1out", |
163 | .ops = &clkops_generic, | 167 | .ops = &clkops_generic, |
164 | .parent = &ck_dpll1, | 168 | .parent = &ck_dpll1, |
165 | .flags = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT, | 169 | .flags = CLOCK_IDLE_CONTROL | ENABLE_REG_32BIT | |
170 | ENABLE_ON_INIT, | ||
166 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2), | 171 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2), |
167 | .enable_bit = EN_CKOUT_ARM, | 172 | .enable_bit = EN_CKOUT_ARM, |
168 | .recalc = &followparent_recalc, | 173 | .recalc = &followparent_recalc, |
@@ -207,10 +212,15 @@ static struct arm_idlect1_clk armper_ck = { | |||
207 | .idlect_shift = 2, | 212 | .idlect_shift = 2, |
208 | }; | 213 | }; |
209 | 214 | ||
215 | /* | ||
216 | * FIXME: This clock seems to be necessary but no-one has asked for its | ||
217 | * activation. [ GPIO code for 1510 ] | ||
218 | */ | ||
210 | static struct clk arm_gpio_ck = { | 219 | static struct clk arm_gpio_ck = { |
211 | .name = "arm_gpio_ck", | 220 | .name = "arm_gpio_ck", |
212 | .ops = &clkops_generic, | 221 | .ops = &clkops_generic, |
213 | .parent = &ck_dpll1, | 222 | .parent = &ck_dpll1, |
223 | .flags = ENABLE_ON_INIT, | ||
214 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2), | 224 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT2), |
215 | .enable_bit = EN_GPIOCK, | 225 | .enable_bit = EN_GPIOCK, |
216 | .recalc = &followparent_recalc, | 226 | .recalc = &followparent_recalc, |
@@ -372,10 +382,15 @@ static struct clk tc1_ck = { | |||
372 | .recalc = &followparent_recalc, | 382 | .recalc = &followparent_recalc, |
373 | }; | 383 | }; |
374 | 384 | ||
385 | /* | ||
386 | * FIXME: This clock seems to be necessary but no-one has asked for its | ||
387 | * activation. [ pm.c (SRAM), CCP, Camera ] | ||
388 | */ | ||
375 | static struct clk tc2_ck = { | 389 | static struct clk tc2_ck = { |
376 | .name = "tc2_ck", | 390 | .name = "tc2_ck", |
377 | .ops = &clkops_generic, | 391 | .ops = &clkops_generic, |
378 | .parent = &tc_ck.clk, | 392 | .parent = &tc_ck.clk, |
393 | .flags = ENABLE_ON_INIT, | ||
379 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3), | 394 | .enable_reg = OMAP1_IO_ADDRESS(ARM_IDLECT3), |
380 | .enable_bit = EN_TC2_CK, | 395 | .enable_bit = EN_TC2_CK, |
381 | .recalc = &followparent_recalc, | 396 | .recalc = &followparent_recalc, |