diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-06-16 12:49:48 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-12-08 14:29:00 -0500 |
commit | b5b4f2881f619460fdb165111bac10a3dd8eebee (patch) | |
tree | 2f41f00e91f11ef77ff47dd0f65fc31b67aeb9c7 /arch/arm/mach-omap2/omap-mpuss-lowpower.c | |
parent | a6e48358d15fec2f3f9e86a6d6fc62422141a3a9 (diff) |
ARM: OMAP4: PM: Program CPU1 to hit OFF when off-lined
Program non-boot CPUs to hit lowest supported power state
when it is off-lined using cpu hotplug framework.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap-mpuss-lowpower.c')
-rw-r--r-- | arch/arm/mach-omap2/omap-mpuss-lowpower.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c index 867fee51e42c..9c1c12b8c5e1 100644 --- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c +++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c | |||
@@ -192,6 +192,38 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state) | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | /** | ||
196 | * omap4_hotplug_cpu: OMAP4 CPU hotplug entry | ||
197 | * @cpu : CPU ID | ||
198 | * @power_state: CPU low power state. | ||
199 | */ | ||
200 | int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) | ||
201 | { | ||
202 | unsigned int cpu_state = 0; | ||
203 | |||
204 | if (omap_rev() == OMAP4430_REV_ES1_0) | ||
205 | return -ENXIO; | ||
206 | |||
207 | if (power_state == PWRDM_POWER_OFF) | ||
208 | cpu_state = 1; | ||
209 | |||
210 | clear_cpu_prev_pwrst(cpu); | ||
211 | set_cpu_next_pwrst(cpu, power_state); | ||
212 | set_cpu_wakeup_addr(cpu, virt_to_phys(omap_secondary_startup)); | ||
213 | scu_pwrst_prepare(cpu, power_state); | ||
214 | |||
215 | /* | ||
216 | * CPU never retuns back if targetted power state is OFF mode. | ||
217 | * CPU ONLINE follows normal CPU ONLINE ptah via | ||
218 | * omap_secondary_startup(). | ||
219 | */ | ||
220 | omap4_finish_suspend(cpu_state); | ||
221 | |||
222 | set_cpu_next_pwrst(cpu, PWRDM_POWER_ON); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | |||
195 | /* | 227 | /* |
196 | * Initialise OMAP4 MPUSS | 228 | * Initialise OMAP4 MPUSS |
197 | */ | 229 | */ |