aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c4
-rw-r--r--arch/arm/plat-samsung/clock-clksrc.c16
-rw-r--r--arch/arm/plat-samsung/include/plat/clock-clksrc.h10
3 files changed, 22 insertions, 8 deletions
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index 555d1aa6b5ac..cb2bf4bff051 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -486,10 +486,10 @@ void __init_or_cpufreq s3c6400_setup_clocks(void)
486 clk_f.rate = fclk; 486 clk_f.rate = fclk;
487 487
488 for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++) 488 for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++)
489 s3c_set_clksrc(init_parents[ptr]); 489 s3c_set_clksrc(init_parents[ptr], true);
490 490
491 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) 491 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
492 s3c_set_clksrc(&clksrcs[ptr]); 492 s3c_set_clksrc(&clksrcs[ptr], true);
493} 493}
494 494
495static struct clk *clks[] __initdata = { 495static struct clk *clks[] __initdata = {
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
128void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk *clk) 128void __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
153static struct clk_ops clksrc_ops = { 154static 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
diff --git a/arch/arm/plat-samsung/include/plat/clock-clksrc.h b/arch/arm/plat-samsung/include/plat/clock-clksrc.h
index 283dfa028757..50a8ca7c3760 100644
--- a/arch/arm/plat-samsung/include/plat/clock-clksrc.h
+++ b/arch/arm/plat-samsung/include/plat/clock-clksrc.h
@@ -63,7 +63,15 @@ struct clksrc_clk {
63 struct clksrc_reg reg_div; 63 struct clksrc_reg reg_div;
64}; 64};
65 65
66extern void s3c_set_clksrc(struct clksrc_clk *clk); 66/**
67 * s3c_set_clksrc() - setup the clock from the register settings
68 * @clk: The clock to setup.
69 * @announce: true to announce the setting to printk().
70 *
71 * Setup the clock from the current register settings, for when the
72 * kernel boots or if it is resuming from a possibly unknown state.
73 */
74extern void s3c_set_clksrc(struct clksrc_clk *clk, bool announce);
67 75
68/** 76/**
69 * s3c_register_clksrc() register clocks from an array of clksrc clocks 77 * s3c_register_clksrc() register clocks from an array of clksrc clocks