[Top] [All Lists]

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

To: "Atsushi Nemoto" <>
Subject: Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.
From: "Franck Bui-Huu" <>
Date: Mon, 18 Jun 2007 11:38:28 +0200
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VLEagSDgoRe3g/TC2aWu8QnHl0AfS50ErBqkwAFfCNxnsmb+ec8WWb+ZHqOW6/YMpeBwHisNv+hkTUTtjIpVJrLvI95zjM3tXkKrZVYyFF9Ws0LqCG/fKXhKN/r93TUYqq6rRekj2b42QhzNrlJSRx3gu/HYw4QITkobBYEo+1U=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Rwwb+Sh27dMm0ZuIFAzie9zzcRfuftSAcxEphob+eoJs3qbXbTL4/IZykJbHjhf0iCUButvO6AcEVul3/JHALSmAGaqeWuJpDyHNGXcR9XdjPnsnzL81ycSbyu5FT+ADnrQF490rO04L6yYOhstGxgCURPkEym1ePPPdieaeSnc=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
Hi Atsushi,

On 6/17/07, Atsushi Nemoto <> wrote:
On Sun, 17 Jun 2007 15:36:53 +0200, "Franck Bui-Huu" <> 
> b) Are there some weird MIPS CPUs out there which don't read/ack cp0
> hpt in the normal way ?

PNX8550?  Their count/compare interrupt altomatically clears the count
register.  Please refer this thread:

Oh no, another weirdo :(

What is suprising me is that there's no comment explaining what is
going on in pnx8550/common/time.c...

I'm not sure this fits new clockevent codes or not.

Not really. What could be done in this case is to use cp0 hpt for
dealing with clock events _only_. I don't think it's an issue if the
count register is automatically cleared in this case.

And it should write it's own clocksource support which would use
different timer.

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);


Note that 'CLKEVT_ONLY' flag currently doesn't exist.

What do you think ?

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