msm: pm-boot: Common API to configure warmboot address
Common API to configure warmboot address during power collapse across
multiple msm platforms.
Change-Id: I64cff7feeca830f75b3873198262bd6f9f818f90
Signed-off-by: Maheshkumar Sivasubramanian <msivasub@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm-8x60.c b/arch/arm/mach-msm/pm-8x60.c
index 911d546..6a78597 100644
--- a/arch/arm/mach-msm/pm-8x60.c
+++ b/arch/arm/mach-msm/pm-8x60.c
@@ -48,6 +48,7 @@
#include "spm.h"
#include "timer.h"
#include "qdss.h"
+#include "pm-boot.h"
/******************************************************************************
* Debug Definitions
@@ -649,7 +650,7 @@
entry = (!dev->cpu || from_idle) ?
msm_pm_collapse_exit : msm_secondary_startup;
- msm_pm_write_boot_vector(dev->cpu, virt_to_phys(entry));
+ msm_pm_boot_config_before_pc(dev->cpu, virt_to_phys(entry));
if (MSM_PM_DEBUG_RESET_VECTOR & msm_pm_debug_mask)
pr_info("CPU%u: %s: program vector to %p\n",
@@ -661,6 +662,8 @@
collapsed = msm_pm_collapse();
+ msm_pm_boot_config_after_pc(dev->cpu);
+
if (collapsed) {
#ifdef CONFIG_VFP
vfp_reinit();
@@ -1179,15 +1182,6 @@
init_completion(&dev->cpu_killed);
#endif
}
-#ifdef CONFIG_MSM_SCM
- ret = scm_set_boot_addr((void *)virt_to_phys(msm_pm_boot_entry),
- SCM_FLAG_WARMBOOT_CPU0 | SCM_FLAG_WARMBOOT_CPU1);
- if (ret) {
- pr_err("%s: failed to set up scm boot addr: %d\n",
- __func__, ret);
- return ret;
- }
-#endif
#ifdef CONFIG_MSM_IDLE_STATS
for_each_possible_cpu(cpu) {