diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-12-08 19:08:35 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-01-15 03:10:10 -0500 |
commit | 682e2b7d45878586ce84f6993da0b8a2981a399d (patch) | |
tree | 7d64665810dd9d2783067714e49f4c51c752b57b /arch/arm/plat-samsung/clock-clksrc.c | |
parent | f3e0b724cc70ef5ee2a6e0d9dfafa2328c294ab3 (diff) |
ARM: S3C64XX: Avoid announcing clksrc clocks twice
The new code calls the clock setup code on registration which
can be before the clock system has been fully initialised. The
following code re-does this setup at the end of the clock
registration and thus we get two printings.
Update the calls to only print on the last pass or when doing
the necessary resume work.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-samsung/clock-clksrc.c')
-rw-r--r-- | arch/arm/plat-samsung/clock-clksrc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/plat-samsung/clock-clksrc.c b/arch/arm/plat-samsung/clock-clksrc.c index ad4e8723a811..12129f8e509c 100644 --- a/arch/arm/plat-samsung/clock-clksrc.c +++ b/arch/arm/plat-samsung/clock-clksrc.c | |||
@@ -125,7 +125,7 @@ static unsigned long s3c_roundrate_clksrc(struct clk *clk, | |||
125 | 125 | ||
126 | /* Clock initialisation code */ | 126 | /* Clock initialisation code */ |
127 | 127 | ||
128 | void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk) | 128 | void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk, bool announce) |
129 | { | 129 | { |
130 | struct clksrc_sources *srcs = clk->sources; | 130 | struct clksrc_sources *srcs = clk->sources; |
131 | u32 mask = bit_mask(clk->reg_src.shift, clk->reg_src.size); | 131 | u32 mask = bit_mask(clk->reg_src.shift, clk->reg_src.size); |
@@ -145,9 +145,10 @@ void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk) | |||
145 | 145 | ||
146 | clk->clk.parent = srcs->sources[clksrc]; | 146 | clk->clk.parent = srcs->sources[clksrc]; |
147 | 147 | ||
148 | printk(KERN_INFO "%s: source is %s (%d), rate is %ld\n", | 148 | if (announce) |
149 | clk->clk.name, clk->clk.parent->name, clksrc, | 149 | printk(KERN_INFO "%s: source is %s (%d), rate is %ld\n", |
150 | clk_get_rate(&clk->clk)); | 150 | clk->clk.name, clk->clk.parent->name, clksrc, |
151 | clk_get_rate(&clk->clk)); | ||
151 | } | 152 | } |
152 | 153 | ||
153 | static struct clk_ops clksrc_ops = { | 154 | static struct clk_ops clksrc_ops = { |
@@ -166,7 +167,12 @@ void __init s3c_register_clksrc(struct clksrc_clk *clksrc, int size) | |||
166 | if (!clksrc->clk.ops) | 167 | if (!clksrc->clk.ops) |
167 | clksrc->clk.ops = &clksrc_ops; | 168 | clksrc->clk.ops = &clksrc_ops; |
168 | 169 | ||
169 | s3c_set_clksrc(clksrc); | 170 | /* setup the clocksource, but do not announce it |
171 | * as it may be re-set by the setup routines | ||
172 | * called after the rest of the clocks have been | ||
173 | * registered | ||
174 | */ | ||
175 | s3c_set_clksrc(clksrc, false); | ||
170 | 176 | ||
171 | ret = s3c24xx_register_clock(&clksrc->clk); | 177 | ret = s3c24xx_register_clock(&clksrc->clk); |
172 | 178 | ||