Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Nico Coesel <ncoesel@DEALogic.nl>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: Alchemy power managment code.
Date: Fri, 28 Mar 2008 19:13:09 +0300	[thread overview]
Message-ID: <47ED1915.6040506@ru.mvista.com> (raw)
In-Reply-To: <19CA9E279FDA5246B7D7A1C91A4AF7F40EF9A2@dealogicserver.DEALogic.nl>

Nico Coesel wrote:

>>>>>Correct - and cevt-r4k won't be usable either.  I guess that means 
>>>>>you leave the user the choice between either these two or using wait.  

>>>>>Not nice but ...

>>>>   The Alchemy code doesn't even try to use CP0 counter when 
>>>>CONFIG_PM=y if you look into 

>>arch/mips/au1000/common/time.c... or at 

>>>>least it didn't before Atsushi removed do_fast_pm_gettimeoffset().

>>>Oh, yes. At that time I tried to implement clocksource drivers for 
>>>non-standard timers, but it seems I had missied Alchemy PM=y case.

>>>The driver would be something like this?  Completely untested ;-)

>>>static cycle_t au1000_hpt_read(void)
>>>{
>>>	return au_readl(SYS_TOYREAD);
>>>}

>>>struct clocksource au1000_clocksource = {
>>>	.name	= "au1000-counter",
>>>	.rating	= 200,

>>    Rating should be greater than that of CP0 counter...

>>>	.read	= au1000_hpt_read,
>>>	.mask	= CLOCKSOURCE_MASK(32),
>>>	.flags	= CLOCK_SOURCE_IS_CONTINUOUS,
>>>};

>>>void __init au1000_clocksource_init(unsinged long cpu_speed) {
>>>	struct clocksource *cs = &au1000_clocksource;
>>>
>>>	clocksource_set_clock(cs, cpu_speed);

>>    Not really, it's clocked by 32768 Hz input, so probably 
>>not very good as a clocksource.

> Why not? If a 32768Hz watch crystal is connected then you'll have a
> stable clocksource. IIRC watch crystals are more precise than the
> crystals used to generate the core frequency.

    32 KHz is too low a frequency. The same goes about using TOY as a 
clockevent -- HRT boasts microsecond resoultion which TOY can't provide.

> Nico Coesel

WBR, Sergei

  parent reply	other threads:[~2008-03-28 16:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-28 16:03 Alchemy power managment code Nico Coesel
2008-03-28 16:03 ` Nico Coesel
2008-03-28 16:13 ` Sergei Shtylyov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-24 14:31 FW: " Sergei Shtylyov
2008-03-27 22:31 ` Ralf Baechle
2008-03-28 11:36   ` Sergei Shtylyov
2008-03-28 14:25     ` Atsushi Nemoto
2008-03-28 15:14       ` Sergei Shtylyov
2008-03-13 13:56 Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47ED1915.6040506@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=linux-mips@linux-mips.org \
    --cc=ncoesel@DEALogic.nl \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox