On Fri, Jul 06, 2001 at 01:03:38PM +0400, Oleg I. Vdovikin wrote:
> return ((long)cc * 100) / CALIBRATE_TIME;
>
> truncates the result to the MHZ because of the '* 100' statement (cc
> is an int value, so you just loose the precision).
No, this is ok. 'cc' is long here, and CALIBRATE
> With both variants even on a 166MHz CPU you'll get above 1e-7 precision,
> which is way above accuracy of any crystal oscillator.
No, this is not so - this line
return ((long)cc * 100) / CALIBRATE_TIME;
truncates the result to the MHZ because of the '* 100' statement (cc
is an
Jeff,
The things are pretty simple (HZ - in real should be "Hz", cause HZ are
fixed for Alpha, HZ = 1024 Hz) :
Hz = cc / calibration_time
cc == rpcc() at end - rpcc() at begin
calibration_time = (CLOCK_TICK_RATE / CALIBRATE_LATCH).
So there is nothing wrong - clock ticks
On Thu, Jul 05, 2001 at 11:14:19AM +0400, Oleg I. Vdovikin wrote:
> Richard, thanks. But please use calibrate_cc version which I've submited
> as a patch - it gives more accuracy with maximum latch we can ever use and
With both variants even on a 166MHz CPU you'll get above 1e-7 precision,
wh
Oleg,
How is this relative to HZ, when you remove all references to HZ?
> -#define CALIBRATE_LATCH(52 * LATCH)
> -#define CALIBRATE_TIME (52 * 120 / HZ)
> +#define CALIBRATE_LATCH0x
[...]
> + /* and the final result in HZ */
> + return ((unsigned long)cc * CLO
That's it.
Please also include my old rtc patch for 2.2.x series into official 2.2.20
kernel.
Thanks,
Oleg.
-
From: "Jeff Garzik" <[EMAIL PROTECTED]>
Subject: Re: [patch] Re: alpha - generic_init_pit - why using RTC for
calibration?
> Oleg,
>
> T
: "Richard Henderson" <[EMAIL PROTECTED]>
To: "Ivan Kokshaysky" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Cc: "Oleg I. Vdovikin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 10:45 PM
Sub
On Fri, Jun 29, 2001 at 09:19:31PM +0400, Ivan Kokshaysky wrote:
> Good idea. The patch below works reliably on my sx164.
Reasonable. Here I've cleaned up time_init a tad as well.
r~
--- arch/alpha/kernel/time.c.orig Fri Jun 29 11:24:03 2001
+++ arch/alpha/kernel/time.cFri Jun 29
8 matches
Mail list logo