[PATCH] mips: use PIT_TICK_RATE in i8253

From: Arnd Bergmann
Date: Mon May 11 2009 - 18:57:24 EST


Using PIT_TICK_RATE instead of CLOCK_TICK_RATE allows
us to later change CLOCK_TICK_RATE to a more sensible
time base value for platforms that do not base their
system timer off an i8253.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
arch/mips/kernel/i8253.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index ed20e7f..3545419 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -8,6 +8,7 @@
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/timex.h>

#include <asm/delay.h>
#include <asm/i8253.h>
@@ -115,7 +116,7 @@ void __init setup_pit_timer(void)
* IO_APIC has been initialized.
*/
cd->cpumask = cpumask_of(cpu);
- clockevent_set_clock(cd, CLOCK_TICK_RATE);
+ clockevent_set_clock(cd, PIT_TICK_RATE);
cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd);
cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
clockevents_register_device(cd);
@@ -203,7 +204,7 @@ static int __init init_pit_clocksource(void)
if (num_possible_cpus() > 1) /* PIT does not scale! */
return 0;

- clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
+ clocksource_pit.mult = clocksource_hz2mult(PIT_TICK_RATE, 20);
return clocksource_register(&clocksource_pit);
}
arch_initcall(init_pit_clocksource);
--
1.6.0.4

--


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/