If I build a kernel with HZ==250 then time runs about 4 four times too
quickly on my Cobalt RaQ2.
The following patch seems to fix it but I'm not sure this is the correct
thing to do.
Signed-off-by: Scott Ashcroft <scott.ashcroft@xxxxxxxxxx>
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index c01a017..f7c6eb2 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -51,8 +51,8 @@ const char *get_system_type(void)
void __init plat_timer_setup(struct irqaction *irq)
{
- /* Load timer value for 1KHz (TCLK is 50MHz) */
- GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS);
+ /* Load timer value for HZ (TCLK is 50MHz) */
+ GALILEO_OUTL(50*1000*1000 / HZ, GT_TC0_OFS);
/* Enable timer */
GALILEO_OUTL(GALILEO_ENTC0 | GALILEO_SELTC0, GT_TC_CONTROL_OFS);