Implementing PowerManagment for a ppc target

Hollis Blanchard hollis at penguinppc.org
Wed Dec 1 10:35:10 EST 2004


On Nov 30, 2004, at 3:40 PM, Sylvain Munaut wrote:
>
> I'm trying to implement Deep Sleep support for a ppc platform based on 
> 5200 and I have some questions :
>
> - How should I "integrate" it to linux, what the proper way ? I've 
> been trying #defining CONFIG_PM and
>   using the set_pm_ops operation but my call backs never get called 
> when doing a echo standby > /sys/power/state
> [...]
> I've been trying to look at Documentation/ and the sources but still 
> I'm not sure ...
>
>
> - How can I ensure that one of my function runs out of I Cache ? Some 
> pieces of assembler needs to not
>   acces memory when the last 'orders' are sent. Does just keeping it 
> small and aligned enough ?

You can see an example of the icache code in the linuxppc-2.4 tree, 
arch/ppc/platforms/ibm405lp_pmasm.S, after 
"_GLOBAL(ibm405lp_pm_command)". (You probably won't need to save and 
restore all CPU state though; that was needed because the 405LP was 
*really* powered down, not just paused.)

You can also see how that code is triggered from ibm405lp_pm.c . I 
don't think that's integrated with any laptop-style sleep work that's 
been done in the past 1.5 years, but it works with /proc/sys/sleep 
anyways (see Documentation/powerpc/405LP-sleep.txt).

-Hollis




More information about the Linuxppc-dev mailing list