David S. Miller writes:
>
> This port is going like a funeral procession, I apologize.
Not at all--nice work. Considering some of the messy stuff
you have to deal with, it is going quite well.
..
> 2) Timers work, I am using the r4k counter/compare register timer
> mechanism because of the bug in the i8254 Intel timer chips
> on certain INDY's. The calibration of the compare offsets
> needs some work but the working framework is there and needs
> a little tweaking, basically my algorithm is:
>
> a) setup i8254 counter 0 and counter 2 such that the period
> of counter 0 is the desired HZ value
> b) poll counter 0 waiting for a value of 1
> c) quickly set CP0_COUNTER to zero
> d) poll counter 0 for value of 1
> e) quickly read CP0_COUNTER value
>
> This seems to approximate the value I want in it's current form
> pretty well. I have to add some fuzz factors into it and possibly
> write the calibration code in assembly to get the accuracy I
> want/need.
When it is time to do R4000 support, I can show you how to work
around the R4000 count/compare bug. (This does not apply to other processors,
such as the R4600, R5000, or R10000.)
|