diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-18 17:33:42 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-19 08:24:16 -0400 |
| commit | 61ee9a4ba05f0a4163d43a33dee7a0651e080b98 (patch) | |
| tree | fa8c42f223acf3016db704790d240fbddd6da1cc | |
| parent | 80b816b736cfa5b9582279127099b20a479ab7d9 (diff) | |
x86: Convert PIT to clockevents_config_and_register()
Let the core do the work.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Link: http://lkml.kernel.org/r/%3C20110518210136.545615675%40linutronix.de%3E
| -rw-r--r-- | arch/x86/kernel/i8253.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index 577e90cadaeb..fb66dc9e36cb 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c | |||
| @@ -93,7 +93,6 @@ static struct clock_event_device pit_ce = { | |||
| 93 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 93 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
| 94 | .set_mode = init_pit_timer, | 94 | .set_mode = init_pit_timer, |
| 95 | .set_next_event = pit_next_event, | 95 | .set_next_event = pit_next_event, |
| 96 | .shift = 32, | ||
| 97 | .irq = 0, | 96 | .irq = 0, |
| 98 | }; | 97 | }; |
| 99 | 98 | ||
| @@ -108,11 +107,8 @@ void __init setup_pit_timer(void) | |||
| 108 | * IO_APIC has been initialized. | 107 | * IO_APIC has been initialized. |
| 109 | */ | 108 | */ |
| 110 | pit_ce.cpumask = cpumask_of(smp_processor_id()); | 109 | pit_ce.cpumask = cpumask_of(smp_processor_id()); |
| 111 | pit_ce.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, pit_ce.shift); | ||
| 112 | pit_ce.max_delta_ns = clockevent_delta2ns(0x7FFF, &pit_ce); | ||
| 113 | pit_ce.min_delta_ns = clockevent_delta2ns(0xF, &pit_ce); | ||
| 114 | 110 | ||
| 115 | clockevents_register_device(&pit_ce); | 111 | clockevents_config_and_register(&pit_ce, CLOCK_TICK_RATE, 0xF, 0x7FFF); |
| 116 | global_clock_event = &pit_ce; | 112 | global_clock_event = &pit_ce; |
| 117 | } | 113 | } |
| 118 | 114 | ||
