[[bc10]]
[[bc10-router]]
#contents

** Suspend /Resume [#y10c3145]
>
OMAP 3530 is capable of handling Suspend/Resume.~
When no CPU power is required such as no communications, the CPU goes to the sleep state. It will be expected to reduce its consumption of energy and to conserve its energy.~
~
To enter the suspend mode, apply the command shown below.~
<Code and Commands>
As the following messages appear on console, the CPU goes to the sleep state.
<Code and Commands>
To go back to Resume, type any key from the serial console or input a signal from its preconfigured wakeup sources (the keypad, touch screen, and other sources that has configured before).~
<Code and Commands>
In the messages shown above, the 5th line, which starts with “Successfully put...,” is the last message at Suspend state. The 6th line is the beginning of Resume since it says to “resume” some devices. The 6th line or later describes the active state (in Resume).~
~
Once rt2x00, the driver USB connected Wi-Fi module, sleeps correctly, USB is kept disconnecting even though bc10 is resumed and re-energized. In this case, USB connected devices can not work after resuming the operation.~

**no_console_suspend [#gea0a31e]
As going to Suspend mode at the configuration above, the message shown below appears.
<Code and Commands>
As seen in the message above, debugging Suspend/Resume itself, no_console_suspend is treated as an option of the booting process of kernel. As this option is effective, the console never goes to sleep mode.~
~
The contents of uEnv.txt used here are shown below. According to uEnv.txt, u-boot is configured to be placed at FAT partition and to be booted from the partition.
<Code and Commands>
At the end of mmcargs, no_console_suspend is added.~
Boot u-boot with this new uEnv.txt, then go to the sleep state. 
<Code and Commands>
Since the console never goes to sleep, the messages the messages continuously describe whole process in real time. As it goes to Suspend or to Resume, the messages explain the process of shifting from the active state to sleep state or vice versa. (As no_console_suspend is NOT set, the messages explain the conditions only after the system is resumed. The process are NOT defined in real time. They are delayed due to the console is in sleep state.)~
As making system Resume by typing any key from the console, the following messages are displayed.~
<Code and Commands>
As no_console_suspend is set, per_pwrdm and core_pwrdm are not going to the sleep sate, and the serial console display the debug outputs from kernel.~

** debugfs [#b49a80cf]
The information of the power management of OMAP3530 is obtained from debugfs.~
First, debugfs is mounted. In the following example, a debug directory is previously made.
Then, mount the debug directory.~
<Code and Commands>
The information of power management is described below the directory of pm_debug/
<Code and Commands>
A directory, which attaches _pwrdm at the end, has the information and configuration of power domain. OMAP3530 divides the power management system into several power domains by the functions of SoC. Each power domain turns on/off the power independently by its need.~
~
count defines the numbers of shifts between on mode and off mode at each power domain. () indicates the present mode.~
<Code and Commands>
time defines the duration of each mode.~
<Code and Commands>
enable_off_mode is the configuration for off mode.~
The default setting of this mode is 0, and it means it maintains the condition of sleep as it is in Suspend.~
<Code and Commands>
Making off mode effective, it goes to deeper sleep condition than Suspend. It reduces the power consumption and conserves the power. To see the difference between these modes, check at /debug/pm_debug/count after going back to Resume.~
~
- As enable_off_mode is 0
Since the device is booted, the power domains of unused video function and SGX are not in OFF, they are sifted into RET.~
<Code and Commands>
- As enable_off_mode is 1
As the device goes to Suspend, it is shifted into OFF.~
<Code and Commands>

** wakeup_timer [#w7a04176]
>
The power management of linux-omap 2.6x branches has wakeup_timer function, which allows the device to the sleep state for the preset duration. wakeup_timer lets the device wake up after the preset duration passes.~
~
Via sysfs interface, wakeup time is configured as it seen below. Then, make it Suspend.~
<Code and Commands>
The configuration above faces it to sleep 5 seconds. Then, it goes to Resume.~
~
To debug the code of power management, this gptimer_wakeup as removed temporally, and there was a plan to bring back a function, which highly resembles gptimer_wakeup after the arrangment of code was completed. However, this plan has not been materialized and the function or gptimer_wakeup has not been added back since then.~
~
omap2+: Remobe gptimer_wakeup for now~
[[https://patchwork.kernel.org/patch/896572]]~
~
Bring back gptimer_wakeup~
[[http://www.spinics.net/lists/linux-omap/msg72142.html]]~
See the listed threads.~
~
* Revision History [#cb9d3d03]
>
- 2013-08-09~
This article is initially published.



Front page   New List of pages Search Recent changes   RSS of recent changes