bc10-router/Suspend Resume
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[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, ...
~
To enter the suspend mode, apply the command shown below.~
# echo mem > /sys/power/state
As the following messages appear on console, the CPU goes...
[ 132.186309] PM: Syncing filesystems ... done.
[ 132.400665] Freezing user space processes ... (elapse...
[ 132.424591] Freezing remaining freezable tasks ... (e...
[ 132.455871] Suspending console(s) (use no_console_sus...
To go back to Resume, type any key from the serial consol...
[ 132.464385] phy0 -> rt2x00lib_suspend: Notice - Going...
[ 132.648376] PM: suspend of devices complete after 185...
[ 132.649017] PM: late suspend of devices complete afte...
[ 132.649902] PM: noirq suspend of devices complete aft...
[ 132.650177] Successfully put all powerdomains to targ...
[ 132.651367] PM: noirq resume of devices complete afte...
[ 132.651916] PM: early resume of devices complete afte...
[ 133.305328] PM: resume of devices complete after 653....
[ 133.357299] Restarting tasks ... [ 133.361206] usb 1...
[ 133.366424] usb 1-2.2: USB disconnect, device number 3
done.
[ 133.386016] usb 1-2.3: USB disconnect, device number 4
[ 133.391784] asix 1-2.3:1.0 eth0: unregister 'asix' us...
In the messages shown above, the 5th line, which starts w...
~
Once rt2x00, the driver USB connected Wi-Fi module, sleep...
**no_console_suspend [#gea0a31e]
>
As going to Suspend mode at the configuration above, the ...
Suspending console(s) (use no_console_suspend to debug)
As seen in the message above, debugging Suspend/Resume it...
~
The contents of uEnv.txt used here are shown below. Accor...
console=ttyO2,115200n8
mpurate=auto
buddy=none
vram=12M
dvimode=640x480MR-16@60
defaultdisplay=dvi
loadaddr=0x80200000
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
mmcargs=setenv bootargs console=${console} ${optargs} mp...
mmcboot=echo Booting from mmc (uEnv.txt configuration) ....
loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage
uenvcmd=run loaduimagefat; run mmcboot
At the end of mmcargs, no_console_suspend is added.~
Boot u-boot with this new uEnv.txt, then go to the sleep ...
# echo mem > /sys/power/state
[ 119.239715] PM: Syncing filesystems ... done.
[ 119.283752] Freezing user space processes ... (elapse...
[ 119.314239] Freezing remaining freezable tasks ... (e...
[ 119.347229] phy0 -> rt2x00lib_suspend: Notice - Going...
[ 119.537750] PM: suspend of devices complete after 191...
[ 119.544555] PM: late suspend of devices complete afte...
[ 119.552093] PM: noirq suspend of devices complete aft...
Since the console never goes to sleep, the messages the m...
As making system Resume by typing any key from the consol...
[ 119.559051] Powerdomain (per_pwrdm) didn't enter targ...
[ 119.559051] Powerdomain (core_pwrdm) didn't enter tar...
[ 119.559051] Could not enter target state in pm_suspend
[ 119.560211] PM: noirq resume of devices complete afte...
[ 119.567443] PM: early resume of devices complete afte...
[ 120.226074] PM: resume of devices complete after 651....
[ 120.233032] Restarting tasks ... [ 120.236968] usb 1...
[ 120.242340] usb 1-2.2: USB disconnect, device number 3
done.
[ 120.271697] usb 1-2.3: USB disconnect, device number 4
[ 120.277496] asix 1-2.3:1.0 eth0: unregister 'asix' us...
As no_console_suspend is set, per_pwrdm and core_pwrdm ar...
** debugfs [#b49a80cf]
>
The information of the power management of OMAP3530 is ob...
First, debugfs is mounted. In the following example, a de...
Then, mount the debug directory.~
# mount -t debugfs debugfs /debug
The information of power management is described below t...
# cat /debug/pm_debug/
/debug/pm_debug/cam_pwrdm/ /debug/pm_debug/mpu_pwr...
/debug/pm_debug/core_pwrdm/ /debug/pm_debug/neon_pw...
/debug/pm_debug/count /debug/pm_debug/per_pwr...
/debug/pm_debug/dss_pwrdm/ /debug/pm_debug/sgx_pwr...
/debug/pm_debug/emu_pwrdm/ /debug/pm_debug/time
/debug/pm_debug/enable_off_mode /debug/pm_debug/usbhost...
/debug/pm_debug/iva2_pwrdm/ /debug/pm_debug/wkup_pw...
A directory, which attaches _pwrdm at the end, has the in...
~
count defines the numbers of shifts between on mode and o...
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:0,RET:130993,INA:0,ON:130994,RET-LOGI...
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:0,RET:149943,INA:3926,ON:153870,RET-...
mpu_pwrdm (ON),OFF:0,RET:149943,INA:3926,ON:153870,RET-L...
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (20)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (1)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (5)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
neon_clkdm->neon_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
prm_clkdm->wkup_pwrdm (0)
cm_clkdm->core_pwrdm (0)
time defines the duration of each mode.~
# cat /debug/pm_debug/time
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305603026
sgx_pwrdm (OFF),OFF:3055783935546,RET:0,INA:0,ON:3521697...
core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305633544
per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305541992
dss_pwrdm (ON),OFF:0,RET:2148355531323,INA:0,ON:91095004...
cam_pwrdm (RET),OFF:0,RET:3055757873534,INA:0,ON:3547698...
neon_pwrdm (ON),OFF:0,RET:3033790375457,INA:481475839,ON...
mpu_pwrdm (ON),OFF:0,RET:3033876709697,INA:482116696,ON:...
iva2_pwrdm (RET),OFF:0,RET:3055783935546,INA:0,ON:352160...
enable_off_mode is the configuration for off mode.~
The default setting of this mode is 0, and it means it ma...
# echo 1 > enable_off_mode
Making off mode effective, it goes to deeper sleep condit...
>
- As enable_off_mode is 0~
Since the device is booted, the power domains of unused v...
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:0,RET:5,INA:0,ON:6,RET-LOGIC-OFF:0,RE...
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:0,RET:8263,INA:538,ON:8802,RET-LOGIC...
mpu_pwrdm (ON),OFF:0,RET:8263,INA:538,ON:8802,RET-LOGIC-...
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (17)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (2)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)
>
- As enable_off_mode is 1~
As the device goes to Suspend, it is shifted into OFF.~
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:497,RET:157983,INA:0,ON:158481,RET-LO...
cam_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:527,RET:178339,INA:2174,ON:181041,RE...
mpu_pwrdm (ON),OFF:527,RET:178339,INA:2174,ON:181041,RET...
iva2_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (17)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (2)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)
** wakeup_timer [#w7a04176]
>
The power management of linux-omap 2.6x branches has wake...
~
Via sysfs interface, wakeup time is configured as it seen...
# echo 5 > /sys/kernel/debug/pm_debug/wakeup_timer_seconds
# echo -n ?mem? > /sys/power/state
The configuration above faces it to sleep 5 seconds. Then...
~
To debug the code of power management, this gptimer_wakeu...
~
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.
End:
[[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, ...
~
To enter the suspend mode, apply the command shown below.~
# echo mem > /sys/power/state
As the following messages appear on console, the CPU goes...
[ 132.186309] PM: Syncing filesystems ... done.
[ 132.400665] Freezing user space processes ... (elapse...
[ 132.424591] Freezing remaining freezable tasks ... (e...
[ 132.455871] Suspending console(s) (use no_console_sus...
To go back to Resume, type any key from the serial consol...
[ 132.464385] phy0 -> rt2x00lib_suspend: Notice - Going...
[ 132.648376] PM: suspend of devices complete after 185...
[ 132.649017] PM: late suspend of devices complete afte...
[ 132.649902] PM: noirq suspend of devices complete aft...
[ 132.650177] Successfully put all powerdomains to targ...
[ 132.651367] PM: noirq resume of devices complete afte...
[ 132.651916] PM: early resume of devices complete afte...
[ 133.305328] PM: resume of devices complete after 653....
[ 133.357299] Restarting tasks ... [ 133.361206] usb 1...
[ 133.366424] usb 1-2.2: USB disconnect, device number 3
done.
[ 133.386016] usb 1-2.3: USB disconnect, device number 4
[ 133.391784] asix 1-2.3:1.0 eth0: unregister 'asix' us...
In the messages shown above, the 5th line, which starts w...
~
Once rt2x00, the driver USB connected Wi-Fi module, sleep...
**no_console_suspend [#gea0a31e]
>
As going to Suspend mode at the configuration above, the ...
Suspending console(s) (use no_console_suspend to debug)
As seen in the message above, debugging Suspend/Resume it...
~
The contents of uEnv.txt used here are shown below. Accor...
console=ttyO2,115200n8
mpurate=auto
buddy=none
vram=12M
dvimode=640x480MR-16@60
defaultdisplay=dvi
loadaddr=0x80200000
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
mmcargs=setenv bootargs console=${console} ${optargs} mp...
mmcboot=echo Booting from mmc (uEnv.txt configuration) ....
loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage
uenvcmd=run loaduimagefat; run mmcboot
At the end of mmcargs, no_console_suspend is added.~
Boot u-boot with this new uEnv.txt, then go to the sleep ...
# echo mem > /sys/power/state
[ 119.239715] PM: Syncing filesystems ... done.
[ 119.283752] Freezing user space processes ... (elapse...
[ 119.314239] Freezing remaining freezable tasks ... (e...
[ 119.347229] phy0 -> rt2x00lib_suspend: Notice - Going...
[ 119.537750] PM: suspend of devices complete after 191...
[ 119.544555] PM: late suspend of devices complete afte...
[ 119.552093] PM: noirq suspend of devices complete aft...
Since the console never goes to sleep, the messages the m...
As making system Resume by typing any key from the consol...
[ 119.559051] Powerdomain (per_pwrdm) didn't enter targ...
[ 119.559051] Powerdomain (core_pwrdm) didn't enter tar...
[ 119.559051] Could not enter target state in pm_suspend
[ 119.560211] PM: noirq resume of devices complete afte...
[ 119.567443] PM: early resume of devices complete afte...
[ 120.226074] PM: resume of devices complete after 651....
[ 120.233032] Restarting tasks ... [ 120.236968] usb 1...
[ 120.242340] usb 1-2.2: USB disconnect, device number 3
done.
[ 120.271697] usb 1-2.3: USB disconnect, device number 4
[ 120.277496] asix 1-2.3:1.0 eth0: unregister 'asix' us...
As no_console_suspend is set, per_pwrdm and core_pwrdm ar...
** debugfs [#b49a80cf]
>
The information of the power management of OMAP3530 is ob...
First, debugfs is mounted. In the following example, a de...
Then, mount the debug directory.~
# mount -t debugfs debugfs /debug
The information of power management is described below t...
# cat /debug/pm_debug/
/debug/pm_debug/cam_pwrdm/ /debug/pm_debug/mpu_pwr...
/debug/pm_debug/core_pwrdm/ /debug/pm_debug/neon_pw...
/debug/pm_debug/count /debug/pm_debug/per_pwr...
/debug/pm_debug/dss_pwrdm/ /debug/pm_debug/sgx_pwr...
/debug/pm_debug/emu_pwrdm/ /debug/pm_debug/time
/debug/pm_debug/enable_off_mode /debug/pm_debug/usbhost...
/debug/pm_debug/iva2_pwrdm/ /debug/pm_debug/wkup_pw...
A directory, which attaches _pwrdm at the end, has the in...
~
count defines the numbers of shifts between on mode and o...
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:0,RET:130993,INA:0,ON:130994,RET-LOGI...
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:0,RET:149943,INA:3926,ON:153870,RET-...
mpu_pwrdm (ON),OFF:0,RET:149943,INA:3926,ON:153870,RET-L...
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (20)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (1)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (5)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
neon_clkdm->neon_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
prm_clkdm->wkup_pwrdm (0)
cm_clkdm->core_pwrdm (0)
time defines the duration of each mode.~
# cat /debug/pm_debug/time
usbhost_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305603026
sgx_pwrdm (OFF),OFF:3055783935546,RET:0,INA:0,ON:3521697...
core_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305633544
per_pwrdm (ON),OFF:0,RET:0,INA:0,ON:3059305541992
dss_pwrdm (ON),OFF:0,RET:2148355531323,INA:0,ON:91095004...
cam_pwrdm (RET),OFF:0,RET:3055757873534,INA:0,ON:3547698...
neon_pwrdm (ON),OFF:0,RET:3033790375457,INA:481475839,ON...
mpu_pwrdm (ON),OFF:0,RET:3033876709697,INA:482116696,ON:...
iva2_pwrdm (RET),OFF:0,RET:3055783935546,INA:0,ON:352160...
enable_off_mode is the configuration for off mode.~
The default setting of this mode is 0, and it means it ma...
# echo 1 > enable_off_mode
Making off mode effective, it goes to deeper sleep condit...
>
- As enable_off_mode is 0~
Since the device is booted, the power domains of unused v...
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:0,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:0,RET:5,INA:0,ON:6,RET-LOGIC-OFF:0,RE...
cam_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:0,RET:8263,INA:538,ON:8802,RET-LOGIC...
mpu_pwrdm (ON),OFF:0,RET:8263,INA:538,ON:8802,RET-LOGIC-...
iva2_pwrdm (RET),OFF:0,RET:1,INA:0,ON:1,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (17)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (2)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)
>
- As enable_off_mode is 1~
As the device goes to Suspend, it is shifted into OFF.~
# cat /debug/pm_debug/count
usbhost_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:...
sgx_pwrdm (OFF),OFF:1,RET:0,INA:0,ON:1,RET-LOGIC-OFF:0,R...
core_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,R...
per_pwrdm (ON),OFF:1,RET:0,INA:0,ON:2,RET-LOGIC-OFF:0,RE...
dss_pwrdm (ON),OFF:497,RET:157983,INA:0,ON:158481,RET-LO...
cam_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,R...
neon_pwrdm (ON),OFF:527,RET:178339,INA:2174,ON:181041,RE...
mpu_pwrdm (ON),OFF:527,RET:178339,INA:2174,ON:181041,RET...
iva2_pwrdm (OFF),OFF:1,RET:1,INA:0,ON:2,RET-LOGIC-OFF:0,...
usbhost_clkdm->usbhost_pwrdm (3)
sgx_clkdm->sgx_pwrdm (0)
per_clkdm->per_pwrdm (17)
cam_clkdm->cam_pwrdm (0)
dss_clkdm->dss_pwrdm (2)
d2d_clkdm->core_pwrdm (0)
iva2_clkdm->iva2_pwrdm (0)
mpu_clkdm->mpu_pwrdm (0)
core_l4_clkdm->core_pwrdm (25)
core_l3_clkdm->core_pwrdm (4)
neon_clkdm->neon_pwrdm (0)
** wakeup_timer [#w7a04176]
>
The power management of linux-omap 2.6x branches has wake...
~
Via sysfs interface, wakeup time is configured as it seen...
# echo 5 > /sys/kernel/debug/pm_debug/wakeup_timer_seconds
# echo -n ?mem? > /sys/power/state
The configuration above faces it to sleep 5 seconds. Then...
~
To debug the code of power management, this gptimer_wakeu...
~
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.
Page: