aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/au1000/common/time.c')
-rw-r--r--arch/mips/au1000/common/time.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index fe418f1620c3..57675b41480e 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -281,7 +281,7 @@ unsigned long cal_r4koff(void)
281 cpu_speed = count * 2; 281 cpu_speed = count * 2;
282 } 282 }
283#else 283#else
284 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * 284 cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) *
285 AU1000_SRC_CLK; 285 AU1000_SRC_CLK;
286 count = cpu_speed / 2; 286 count = cpu_speed / 2;
287#endif 287#endif
@@ -356,7 +356,7 @@ static unsigned long do_fast_cp0_gettimeoffset(void)
356 : "hi", "lo", GCC_REG_ACCUM); 356 : "hi", "lo", GCC_REG_ACCUM);
357 357
358 /* 358 /*
359 * Due to possible jiffies inconsistencies, we need to check 359 * Due to possible jiffies inconsistencies, we need to check
360 * the result so that we'll get a timer that is monotonic. 360 * the result so that we'll get a timer that is monotonic.
361 */ 361 */
362 if (res >= USECS_PER_JIFFY) 362 if (res >= USECS_PER_JIFFY)
@@ -375,8 +375,8 @@ static unsigned long do_fast_pm_gettimeoffset(void)
375 au_sync(); 375 au_sync();
376 offset = pc0 - last_pc0; 376 offset = pc0 - last_pc0;
377 if (offset > 2*MATCH20_INC) { 377 if (offset > 2*MATCH20_INC) {
378 printk("huge offset %x, last_pc0 %x last_match20 %x pc0 %x\n", 378 printk("huge offset %x, last_pc0 %x last_match20 %x pc0 %x\n",
379 (unsigned)offset, (unsigned)last_pc0, 379 (unsigned)offset, (unsigned)last_pc0,
380 (unsigned)last_match20, (unsigned)pc0); 380 (unsigned)last_match20, (unsigned)pc0);
381 } 381 }
382 offset = (unsigned long)((offset * 305) / 10); 382 offset = (unsigned long)((offset * 305) / 10);
@@ -394,11 +394,11 @@ void au1xxx_timer_setup(struct irqaction *irq)
394 r4k_offset = cal_r4koff(); 394 r4k_offset = cal_r4koff();
395 printk("%08lx(%d)\n", r4k_offset, (int) r4k_offset); 395 printk("%08lx(%d)\n", r4k_offset, (int) r4k_offset);
396 396
397 //est_freq = 2*r4k_offset*HZ; 397 //est_freq = 2*r4k_offset*HZ;
398 est_freq = r4k_offset*HZ; 398 est_freq = r4k_offset*HZ;
399 est_freq += 5000; /* round */ 399 est_freq += 5000; /* round */
400 est_freq -= est_freq%10000; 400 est_freq -= est_freq%10000;
401 printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, 401 printk("CPU frequency %d.%02d MHz\n", est_freq/1000000,
402 (est_freq%1000000)*100/1000000); 402 (est_freq%1000000)*100/1000000);
403 set_au1x00_speed(est_freq); 403 set_au1x00_speed(est_freq);
404 set_au1x00_lcd_clock(); // program the LCD clock 404 set_au1x00_lcd_clock(); // program the LCD clock