diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-06-11 17:10:16 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-06-11 17:10:16 +0900 |
commit | 3977407e83129f53e43d3ac44be8702f59fa3f77 (patch) | |
tree | f13423f274e9a01cc1b1566aae4a0cc1d12b1f6f /drivers/clocksource | |
parent | c2225a57e596a308424e59abc7e864f866fe4493 (diff) | |
download | linux-3977407e83129f53e43d3ac44be8702f59fa3f77.tar.bz2 |
clocksource: sh_tmu: Use clockevents_config_and_register().
This switches over to the now exported clockevents_config() and
clockevents_config_and_register() helpers. This knocks off a
long-standing TMU TODO item.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/sh_tmu.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 852b3f19a555..c1b51d49d106 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -245,12 +245,7 @@ static void sh_tmu_clock_event_start(struct sh_tmu_priv *p, int periodic) sh_tmu_enable(p); - /* TODO: calculate good shift from rate and counter bit width */ - - ced->shift = 32; - ced->mult = div_sc(p->rate, NSEC_PER_SEC, ced->shift); - ced->max_delta_ns = clockevent_delta2ns(0xffffffff, ced); - ced->min_delta_ns = 5000; + clockevents_config(ced, p->rate); if (periodic) { p->periodic = (p->rate + HZ/2) / HZ; @@ -323,7 +318,8 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p, ced->set_mode = sh_tmu_clock_event_mode; dev_info(&p->pdev->dev, "used for clock events\n"); - clockevents_register_device(ced); + + clockevents_config_and_register(ced, 1, 0x300, 0xffffffff); ret = setup_irq(p->irqaction.irq, &p->irqaction); if (ret) { |