[resend]]PATCH 2.6] vr41xx: fixed gettimeoffset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

VR41xx gettimeoffset is wrong.
This patch changes vr41xx gettimeoffset to fixed rate gettimeoffset.

Please apply this patch to v2.6.

Yoichi

Signed-off-by: Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>

diff -urN -X dontdiff a-orig/arch/mips/vr41xx/common/rtc.c a/arch/mips/vr41xx/common/rtc.c
--- a-orig/arch/mips/vr41xx/common/rtc.c	Thu May 27 02:11:11 2004
+++ a/arch/mips/vr41xx/common/rtc.c	Sat Jan 22 22:24:33 2005
@@ -1,7 +1,7 @@
 /*
  *  rtc.c, RTC(has only timer function) routines for NEC VR4100 series.
  *
- *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>
+ *  Copyright (C) 2003-2005  Yoichi Yuasa <yuasa@xxxxxxxxxxxxxx>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -188,7 +188,7 @@
 
 	if (cycles_per_sec >= CLOCK_TICK_RATE) {
 		cycles_per_sec = 0;
-		remainder_per_sec = REMAINDER_PER_SEC;
+		remainder_per_sec += REMAINDER_PER_SEC;
 	}
 
 	cycles_per_jiffy = 0;
@@ -219,18 +219,6 @@
 	return (unsigned int)cur;
 }
 
-static unsigned long vr41xx_gettimeoffset(void)
-{
-	uint64_t cur;
-	unsigned long gap;
-
-	cur = read_elapsedtime_counter();
-	gap = (unsigned long)(cur - previous_elapsedtime);
-	gap = gap / CYCLES_PER_100USEC * 100;	/* usec */
-
-	return gap;
-}
-
 static unsigned long vr41xx_get_time(void)
 {
 	uint64_t counts;
@@ -293,8 +281,6 @@
 
 static void __init vr41xx_timer_setup(struct irqaction *irq)
 {
-	do_gettimeoffset = vr41xx_gettimeoffset;
-
 	remainder_per_sec = REMAINDER_PER_SEC;
 	cycles_per_jiffy = CYCLES_PER_JIFFY;
 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux