diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2013-07-25 23:17:36 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-08-22 11:20:45 -0400 |
commit | 547dd1e089db9927ad95cfb525152fec5153cfeb (patch) | |
tree | 4ef558be6c04065b706db99ea48df8005f2bcd7a | |
parent | f36b594f37545eedb0358db88b071137dccd1582 (diff) |
ARM: mx53: Allow suspend/resume
Current imx53_pm_init() implementation is incomplete as it lacks calling
suspend_set_ops().
Use a single imx5_pm_init() function to handle both mx51 and mx53.
This allows mx53 to enter in low-power mode.
Tested on a mx53qsb:
root@freescale /$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
mmc0: card e624 removed
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
... (Press Power button)
PM: suspend of devices complete after 17.067 msecs
PM: suspend devices took 0.020 seconds
PM: late suspend of devices complete after 0.954 msecs
PM: noirq suspend of devices complete after 1.288 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 0.680 msecs
PM: early resume of devices complete after 0.914 msecs
PM: resume of devices complete after 44.955 msecs
PM: resume devices took 0.050 seconds
Restarting tasks ... done.
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card at address e624
mmcblk0: mmc0:e624 SU04G 3.69 GiB
mmcblk0: p1 p2 p3
libphy: 63fec000.etherne:00 - Link is Down
libphy: 63fec000.etherne:00 - Link is Up - 100/Full
root@freescale /$
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | arch/arm/mach-imx/common.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx5.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/pm-imx5.c | 7 |
3 files changed, 5 insertions, 12 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index b96aff7476ea..cdc9288ac48a 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -147,12 +147,10 @@ extern int imx_cpu_kill(unsigned int cpu); | |||
147 | 147 | ||
148 | #ifdef CONFIG_PM | 148 | #ifdef CONFIG_PM |
149 | extern void imx6q_pm_init(void); | 149 | extern void imx6q_pm_init(void); |
150 | extern void imx51_pm_init(void); | 150 | extern void imx5_pm_init(void); |
151 | extern void imx53_pm_init(void); | ||
152 | #else | 151 | #else |
153 | static inline void imx6q_pm_init(void) {} | 152 | static inline void imx6q_pm_init(void) {} |
154 | static inline void imx51_pm_init(void) {} | 153 | static inline void imx5_pm_init(void) {} |
155 | static inline void imx53_pm_init(void) {} | ||
156 | #endif | 154 | #endif |
157 | 155 | ||
158 | #ifdef CONFIG_NEON | 156 | #ifdef CONFIG_NEON |
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index cf193d87274a..a8229b7f10bf 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -153,10 +153,10 @@ void __init imx51_soc_init(void) | |||
153 | void __init imx51_init_late(void) | 153 | void __init imx51_init_late(void) |
154 | { | 154 | { |
155 | mx51_neon_fixup(); | 155 | mx51_neon_fixup(); |
156 | imx51_pm_init(); | 156 | imx5_pm_init(); |
157 | } | 157 | } |
158 | 158 | ||
159 | void __init imx53_init_late(void) | 159 | void __init imx53_init_late(void) |
160 | { | 160 | { |
161 | imx53_pm_init(); | 161 | imx5_pm_init(); |
162 | } | 162 | } |
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index 82e79c658eb2..58aeaf5baaf6 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c | |||
@@ -169,14 +169,9 @@ static int __init imx5_pm_common_init(void) | |||
169 | return imx5_cpuidle_init(); | 169 | return imx5_cpuidle_init(); |
170 | } | 170 | } |
171 | 171 | ||
172 | void __init imx51_pm_init(void) | 172 | void __init imx5_pm_init(void) |
173 | { | 173 | { |
174 | int ret = imx5_pm_common_init(); | 174 | int ret = imx5_pm_common_init(); |
175 | if (!ret) | 175 | if (!ret) |
176 | suspend_set_ops(&mx5_suspend_ops); | 176 | suspend_set_ops(&mx5_suspend_ops); |
177 | } | 177 | } |
178 | |||
179 | void __init imx53_pm_init(void) | ||
180 | { | ||
181 | imx5_pm_common_init(); | ||
182 | } | ||