[Top] [All Lists]

Re: some questions about mips timer

To: Florian Fainelli <>
Subject: Re: some questions about mips timer
From: Ralf Baechle <>
Date: Tue, 6 Mar 2012 21:27:12 +0100
Cc: loody <>, Linux MIPS Mailing List <>
In-reply-to: <160192556.459513.1331042510355.JavaMail.root@zmc>
References: <> <160192556.459513.1331042510355.JavaMail.root@zmc>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Mar 06, 2012 at 03:01:50PM +0100, Florian Fainelli wrote:

> > hi all:
> > I have some questions about mips_hpt_frequency:
> > 1. is mips_hpt_frequency == mips cpu frequency?
> No, it is usually cpu frequency / 2.

The architecture specification leaves the counter clock rate up up to the
implementation and only says the clock rate is a function of the pipeline
clock.  In all reality this means the counter is running at the full or
half frequency.  Just don't build on it,

  clock := pipeline_clock * next_weeks_lottery_number % 42

would by compliant ;-)

On some CPUs the frequency can even be selected through a configuration
bitstream at reset time so you can't always count on a fixed relation
between CPU clock and count rate.

Some older CPU manuals contain a confusing wording saying the counter
increments at half (or full) instruction issue rate.  That just means the
pipeline clock, no reason to be confused.


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