linux-mips
[Top] [All Lists]

Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.

To: vagabon.xyz@gmail.com
Subject: Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 19 Jun 2007 00:51:21 +0900 (JST)
Cc: ralf@linux-mips.org, macro@linux-mips.org, sshtylyov@ru.mvista.com, linux-mips@linux-mips.org
In-reply-to: <cda58cb80706180238r17da4434jcdee307b0385729b@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cda58cb80706170636kbff000cw849fa1d5ccf31152@mail.gmail.com> <20070618.011425.93018724.anemo@mba.ocn.ne.jp> <cda58cb80706180238r17da4434jcdee307b0385729b@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 18 Jun 2007 11:38:28 +0200, "Franck Bui-Huu" <vagabon.xyz@gmail.com> 
wrote:
> And it should write it's own clocksource support which would use
> different timer.

I suppose so.

> It shoud result in something like this:
> 
> unsigned __init get_freq(int cpu)
> {
>       return 27UL * ((1000000UL * n)/(m * pow2p));
> }
> 
> void __init plat_timer_init()
> {
>       struct cp0_hpt_info info;
> 
>       info.get_freq = get_freq;
>       info.irq = PNX8550_INT_TIMER1;
>       setup_cp0_hpt(&info, CLKEVT_ONLY);
> 
>       setup_my_clocksource_using_a_different_timer();
> }
> 
> Note that 'CLKEVT_ONLY' flag currently doesn't exist.
> 
> What do you think ?

For now, I think bloating generic setup_cp0_hpt() for this particular
chip is not good.  The pnx8550 can have customized copy of cp0_hpt
routines.  But it's just a thought...

---
Atsushi Nemoto

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