msm: pm: clean boot vector in outer cache after writing
The boot vector will need to be cleaned in the outer cache
after being written to ensure that it can be read by a CPU
which is waking up from power collapse. Calling
v7_flush_dcache_all is not sufficient on targets which
have an outer cache.
There is currently no requirement for the boot vector write to
happen in an assembly environment, and moving it to C makes
cleaning the outer cache easier.
Change-Id: I64c2577c9159adf25b26995a7e3ac0285d01d0d6
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm-boot.c b/arch/arm/mach-msm/pm-boot.c
index 6308453..7039e7d 100644
--- a/arch/arm/mach-msm/pm-boot.c
+++ b/arch/arm/mach-msm/pm-boot.c
@@ -29,6 +29,14 @@
static void (*msm_pm_boot_after_pc)(unsigned int cpu);
#ifdef CONFIG_MSM_SCM
+static void msm_pm_write_boot_vector(unsigned int cpu, unsigned long address)
+{
+ msm_pm_boot_vector[cpu] = address;
+ clean_caches((unsigned long)&msm_pm_boot_vector[cpu],
+ sizeof(msm_pm_boot_vector[cpu]),
+ virt_to_phys(&msm_pm_boot_vector[cpu]));
+}
+
static int __init msm_pm_tz_boot_init(void)
{
int flag = 0;