Add basic power management support for DaVinci.
Changes in v2:
- Update to 2.6.24
Functionality:
It support two modes: Normal ARM idle (WaitForInterrupt, WFI) waking
at every (timer etc.) interrupt and deeper sleep (suspend/standby)
with SDRAM switched to self refresh waking only on selected (wake)
interrupts.
Usage & testing:
The "normal" ARM idle ("mpu idle") is on by default. You can observe
idle count using
# cat /sys/power/count_idle
You will see that it permanently counts up, showing that this state is
entered quite often.
The sleep mode (standby) is entered only on request. You need a proper
wake up source configured. For testing, I use a system without any
network traffic, so I can use network (EMAC) as wake source. You can
switch to standby with standard Linux power management command "echo
standby > /sys/power/state" and observe standby count:
# cat /sys/power/count_standby
0
# echo standby > /sys/power/state
Syncing filesystems ...
done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s)
-> System is at standby now, you are *not* able to enter anything. All
interrupts except EMAC are switched off! On host PC do something with
network, e.g. ping target. Then system wakes up:
Restarting tasks ... done.
#
# cat /sys/power/count_standby
1
#
Above functionality is tested on DM6446 DVEVM.
Kernel config:
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_UP_POSSIBLE=y
CONFIG_SUSPEND=y
ToDo:
- Before going to standby, check for still running DMAs
- In standby, we can save more power using PSC
- In standby, we can save more power gating input clocks of memory
controller, see SPRUE22C, section 2.15
- Measure power consumption ;)
This patch replaces v1 version [2].
Regards
Dirk
[1]
http://source.mvista.com/git/?p=linux-davinci-2.6.git;a=blob_plain;f=Documentation/power/states.txt;hb=HEAD
[2]
http://linux.omap.com/pipermail/davinci-linux-open-source/2008-January/004917.html
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source