Subject: Re: mvme68k timecounters.... untested
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: port-mvme68k
Date: 09/17/2006 00:55:30
Izumi Tsutsui wrote:
> garrett_damore@tadpole.com wrote:
>
>   
>> +		cnt += (0xffff - PCC_TIMER100HZ);	/* adds 1600 */
>>     
>  :
>   
>> +		/* record progress for timecounter */
>> +		clock_pcc_count += (0xffff - PCC_TIMER100HZ);
>>     
>
>
> These should use 0x10000 instead of 0xffff?
>   

Yes.

> Anyway, "pcc_timer_hz2lin(100)" macro is better.
>   

Maybe.  But the 0x10000 has to stand, because the counter counts _up_
from PCC_TIMER100HZ and ticks when it overflows to 0.  I think the macro
PCC_TIMER100HZ is actually easier to read, but I'm not terribly "close"
to this platform.

> Probably you also have to apply the similar changes against
> sys/dev/mvme/clock_pcctwo.c. (shared with mvmeppc. umm)
>   

Really?  I know nothing about VME, really.  Should this driver be
shared?  In any case I assumed that powerpc platforms would just use
their on-chip cycle counters.
> ---
> Izumi Tsutsui
>   



-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191