Linux MIPS Architecture development
 help / color / mirror / Atom feed
* FW: Alchemy power managment code.
@ 2008-03-13 16:16 Nico Coesel
  2008-03-13 16:16 ` Nico Coesel
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Nico Coesel @ 2008-03-13 16:16 UTC (permalink / raw)
  To: linux-mips

Ralf,
Funny you ask because I tried this yesterday on a AU1100 system with the
2.6.24 kernel (from kernel.org). I'm afraid I must say the kernel
crashes when I enable power management. The reason I want to use power
management is because I need to send the CPU to sleep when the system
shuts down. I hacked power.c and reset.c a bit so au_sleep() is called
when the system is shut down. Perhaps someone can confirm the
powermanagement can be made to work with some fixes (it didn't work with
2.6.21-rc4 either).

The CPU frequency switching stuff isn't very usefull since it is
possible to derive various pheripheral frequencies from it. For
instance, on our board the LCD frequency is derived from the CPU
frequency. The auxilary frequency cannot by divided to provide the
refreshrate we need. So changing the CPU frequency would 'break' our LCD
display.

Nico Coesel 

> -----Oorspronkelijk bericht-----
> Van: linux-mips-bounce@linux-mips.org 
> [mailto:linux-mips-bounce@linux-mips.org] Namens Ralf Baechle
> Verzonden: donderdag 13 maart 2008 14:56
> Aan: linux-mips@linux-mips.org
> Onderwerp: Alchemy power managment code.
> 
> The Alchemy code in arch/mips/au1000/common/power.c is one of the last

> remaining users of pm_send_all() which happens to be a nop call 
> because nothing registers callbacks with pm_register.  So the 
> pm_send_all() calls can be removed.
> 
> Which leaves pm_do_suspend with no sensible code, so it can be 
> removed.
> And ripped like this pm_do_sleep looks it it may well no longer be 
> functioning.
> 
> So, anybody still using that stuff, does it provide any useful 
> functionality?  Does the CPU frequency stuff actually work?
> 
>   Ralf
> 
> PS: You should hear the engine of my chainsaw warming up ...
> 
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: Alchemy power managment code.
@ 2008-03-28 16:03 Nico Coesel
  2008-03-28 16:03 ` Nico Coesel
  2008-03-28 16:13 ` Sergei Shtylyov
  0 siblings, 2 replies; 17+ messages in thread
From: Nico Coesel @ 2008-03-28 16:03 UTC (permalink / raw)
  To: Sergei Shtylyov, Atsushi Nemoto; +Cc: ralf, linux-mips

> -----Oorspronkelijk bericht-----
> Van: Sergei Shtylyov [mailto:sshtylyov@ru.mvista.com] 
> Verzonden: vrijdag 28 maart 2008 16:15
> Aan: Atsushi Nemoto
> CC: ralf@linux-mips.org; linux-mips@linux-mips.org; Nico Coesel
> Onderwerp: Re: Alchemy power managment code.
> 
> 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.

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.
 
Nico Coesel

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Alchemy power managment code.
@ 2008-03-13 13:56 Ralf Baechle
  0 siblings, 0 replies; 17+ messages in thread
From: Ralf Baechle @ 2008-03-13 13:56 UTC (permalink / raw)
  To: linux-mips

The Alchemy code in arch/mips/au1000/common/power.c is one of the last
remaining users of pm_send_all() which happens to be a nop call because
nothing registers callbacks with pm_register.  So the pm_send_all() calls
can be removed.

Which leaves pm_do_suspend with no sensible code, so it can be removed.
And ripped like this pm_do_sleep looks it it may well no longer be
functioning.

So, anybody still using that stuff, does it provide any useful
functionality?  Does the CPU frequency stuff actually work?

  Ralf

PS: You should hear the engine of my chainsaw warming up ...

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-03-28 16:12 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox