aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-mpuss-lowpower.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap-mpuss-lowpower.c')
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index ff4e6a0e9c7c..aac46bfdbeb2 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -50,6 +50,7 @@
50#include <asm/suspend.h> 50#include <asm/suspend.h>
51#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
52 52
53#include "soc.h"
53#include "common.h" 54#include "common.h"
54#include "omap44xx.h" 55#include "omap44xx.h"
55#include "omap4-sar-layout.h" 56#include "omap4-sar-layout.h"
@@ -67,6 +68,7 @@ struct omap4_cpu_pm_info {
67 void __iomem *scu_sar_addr; 68 void __iomem *scu_sar_addr;
68 void __iomem *wkup_sar_addr; 69 void __iomem *wkup_sar_addr;
69 void __iomem *l2x0_sar_addr; 70 void __iomem *l2x0_sar_addr;
71 void (*secondary_startup)(void);
70}; 72};
71 73
72static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); 74static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
@@ -299,6 +301,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
299int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state) 301int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
300{ 302{
301 unsigned int cpu_state = 0; 303 unsigned int cpu_state = 0;
304 struct omap4_cpu_pm_info *pm_info = &per_cpu(omap4_pm_info, cpu);
302 305
303 if (omap_rev() == OMAP4430_REV_ES1_0) 306 if (omap_rev() == OMAP4430_REV_ES1_0)
304 return -ENXIO; 307 return -ENXIO;
@@ -308,7 +311,7 @@ int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
308 311
309 clear_cpu_prev_pwrst(cpu); 312 clear_cpu_prev_pwrst(cpu);
310 set_cpu_next_pwrst(cpu, power_state); 313 set_cpu_next_pwrst(cpu, power_state);
311 set_cpu_wakeup_addr(cpu, virt_to_phys(omap_secondary_startup)); 314 set_cpu_wakeup_addr(cpu, virt_to_phys(pm_info->secondary_startup));
312 scu_pwrst_prepare(cpu, power_state); 315 scu_pwrst_prepare(cpu, power_state);
313 316
314 /* 317 /*
@@ -359,6 +362,11 @@ int __init omap4_mpuss_init(void)
359 pm_info->scu_sar_addr = sar_base + SCU_OFFSET1; 362 pm_info->scu_sar_addr = sar_base + SCU_OFFSET1;
360 pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET; 363 pm_info->wkup_sar_addr = sar_base + CPU1_WAKEUP_NS_PA_ADDR_OFFSET;
361 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1; 364 pm_info->l2x0_sar_addr = sar_base + L2X0_SAVE_OFFSET1;
365 if (cpu_is_omap446x())
366 pm_info->secondary_startup = omap_secondary_startup_4460;
367 else
368 pm_info->secondary_startup = omap_secondary_startup;
369
362 pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm"); 370 pm_info->pwrdm = pwrdm_lookup("cpu1_pwrdm");
363 if (!pm_info->pwrdm) { 371 if (!pm_info->pwrdm) {
364 pr_err("Lookup failed for CPU1 pwrdm\n"); 372 pr_err("Lookup failed for CPU1 pwrdm\n");