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

Hello.

Atsushi Nemoto 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.

> 	clocksource_register(cs);
> }

WBR, Sergei

  reply	other threads:[~2008-03-28 15:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 16:16 FW: Alchemy power managment code Nico Coesel
2008-03-13 16:16 ` Nico Coesel
2008-03-13 16:45 ` Sergei Shtylyov
2008-03-24 14:23 ` Sergei Shtylyov
2008-03-24 14:31   ` Sergei Shtylyov
2008-03-27 22:31     ` Ralf Baechle
2008-03-28 11:36       ` Sergei Shtylyov
2008-03-28 13:32         ` Ralf Baechle
2008-03-28 14:25         ` Atsushi Nemoto
2008-03-28 15:14           ` Sergei Shtylyov [this message]
2008-03-26 16:31 ` FW: " Sergei Shtylyov
2008-03-27 22:32   ` Ralf Baechle
2008-03-28 11:39     ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2008-03-28 16:03 Nico Coesel
2008-03-28 16:03 ` Nico Coesel
2008-03-28 16:13 ` 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=47ED0B5C.9060003@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