diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2011-12-13 06:46:43 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-23 17:54:50 -0500 |
commit | 54d15b1d7ac550ecd8ab6b04309c2def614f8c80 (patch) | |
tree | 845c2c307a94ffae18db9292591340a8a338c917 | |
parent | c41584ddc1b9c7d06726057456d188d4eefec60b (diff) |
ARM: 7210/1: smp_twd: modernize clock event registration
This break-out from Colin Cross' cpufreq-aware TWD patch will
just modernize the clock event registration code to use
clockevents_config_and_register().
[Broke out of larger SMP TWD patch]
Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/smp_twd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index a8a6682d6b52..f0575610b17e 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -173,15 +173,11 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) | |||
173 | clk->rating = 350; | 173 | clk->rating = 350; |
174 | clk->set_mode = twd_set_mode; | 174 | clk->set_mode = twd_set_mode; |
175 | clk->set_next_event = twd_set_next_event; | 175 | clk->set_next_event = twd_set_next_event; |
176 | clk->shift = 20; | ||
177 | clk->mult = div_sc(twd_timer_rate, NSEC_PER_SEC, clk->shift); | ||
178 | clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); | ||
179 | clk->min_delta_ns = clockevent_delta2ns(0xf, clk); | ||
180 | 176 | ||
181 | this_cpu_clk = __this_cpu_ptr(twd_evt); | 177 | this_cpu_clk = __this_cpu_ptr(twd_evt); |
182 | *this_cpu_clk = clk; | 178 | *this_cpu_clk = clk; |
183 | 179 | ||
184 | clockevents_register_device(clk); | 180 | clockevents_config_and_register(clk, twd_timer_rate, |
185 | 181 | 0xf, 0xffffffff); | |
186 | enable_percpu_irq(clk->irq, 0); | 182 | enable_percpu_irq(clk->irq, 0); |
187 | } | 183 | } |