linux-mips
[Top] [All Lists]

Re: [PATCH] txx9tmr clockevent/clocksource driver (take 2)

To: sshtylyov@ru.mvista.com
Subject: Re: [PATCH] txx9tmr clockevent/clocksource driver (take 2)
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 25 Oct 2007 11:12:44 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <471F9655.2010702@ru.mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071025.013409.26096880.anemo@mba.ocn.ne.jp> <471F9655.2010702@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 24 Oct 2007 23:00:37 +0400, Sergei Shtylyov <sshtylyov@ru.mvista.com> 
wrote:
> > +   if (tx4927_ccfgptr->ccfg & TX4927_CCFG_TINTDIS)
> > +           txx9_clockevent_init(TX4927_TMR_REG(0) & 0xfffffffffULL,
> > +                                TXX9_IRQ_BASE + 17,
> > +                                50000000);
> 
>     Wait, you're not registering TXx9 clocksource anyway, so it's only taking 
> space indeed.  Maybe we should register clock source/event regardless of the 
> value of CCFG.TINTDIS, and let them be selected according to rating?

Yes, I did not intentionally.  If new board developers wanted to use
txx9_clocksource (for some mysterious reason), he can register it.

For existing tx49 platform, no good reason to use txx9_clocksource.
The standard mips_clocksource can be used regardless of TINTDIS, and
mips_clocksource is _always_ has higher precision (and lightweight)
than txx9_clocksource.

And if you only registered txx9 clock source/event and did not use
them, those timer modules cannot be used for other purpose (for
example, pulse generator) anymore.  It looks overkill for me.

---
Atsushi Nemoto

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