linux-mips
[Top] [All Lists]

Re: 2.6.19 timer API changes

To: sshtylyov@ru.mvista.com
Subject: Re: 2.6.19 timer API changes
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 21 Dec 2006 00:40:17 +0900 (JST)
Cc: danieljlaird@hotmail.com, linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <458948C5.4050909@ru.mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <7949125.post@talk.nabble.com> <20061220.021508.97296486.anemo@mba.ocn.ne.jp> <458948C5.4050909@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 20 Dec 2006 17:29:25 +0300, Sergei Shtylyov <sshtylyov@ru.mvista.com> 
wrote:
> > How about this?  You should still fix pnx8550_hpt_read() anyway, but I
> > suppose gettimeofday() on PNX8550 was broken long time.
> 
>     And nobody noticed. :-)

I changed my mind a bit.  The pre-clocksource gettimeofday() might
work well on PNX8550.  There was timerlo variable which hold COUNT
value on last timer interrupt and fixed_gettimeoffset() subtracted
timerlo from COUNT value at the time.

On Wed, 20 Dec 2006 17:29:25 +0300, Sergei Shtylyov <sshtylyov@ru.mvista.com> 
wrote:

> > +static cycle_t pnx8550_hpt_read(void)
> > +{
> > +   /* FIXME: we should use timer2 or timer3 as freerun counter */
> > +   return read_c0_count();
>  > +}
> 
>     I'd suggest read_c0_count2() here, possibly adding an interrupt
> handler for it since it will interrupt upon hitting compare2
> reg. value (but we could probably just mask the IRQ off), and
> enabling the timer 2, of course (the current code disables it)...

It would be right direction.  And we should set set count2 frequency
to mips_hpt_frequency.  But I cannot test it by myself so I'd like to
leave it for others.  Good exercise ;)

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>