msm: pm-boot: Use different memory API to allocate block of memory
Currently PM driver uses the memory given by the "memblock_alloc"
api. These initial memory bytes are programmed with warm boot entry
sequences to come out of the low power modes. Currently this API is
causing the system instability with 1GB DDR parts and HIGH MEM is
enabled. To resolve this issue use a different API to allocate the
memory i.e memblock_remove.
Change-Id: I1016d63f1154e7b4d4d4b702202878d6f93cecf0
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm-boot.c b/arch/arm/mach-msm/pm-boot.c
index f65b8ad..80e5a55 100644
--- a/arch/arm/mach-msm/pm-boot.c
+++ b/arch/arm/mach-msm/pm-boot.c
@@ -102,6 +102,7 @@
{
int ret = 0;
unsigned long entry;
+ void __iomem *warm_boot_ptr;
switch (pdata->mode) {
case MSM_PM_BOOT_CONFIG_TZ:
@@ -124,16 +125,17 @@
= msm_pm_config_rst_vector_after_pc;
break;
case MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR:
- /*
- * Set the boot remap address and enable remapping of
- * reset vector
- */
- if (!pdata->p_addr || !pdata->v_addr)
- return -ENODEV;
-
- ret = msm_pm_boot_reset_vector_init(__va(pdata->p_addr));
-
if (!cpu_is_msm8625()) {
+ /*
+ * Set the boot remap address and enable remapping of
+ * reset vector
+ */
+ if (!pdata->p_addr || !pdata->v_addr)
+ return -ENODEV;
+
+ ret = msm_pm_boot_reset_vector_init(
+ __va(pdata->p_addr));
+
__raw_writel((pdata->p_addr | BOOT_REMAP_ENABLE),
pdata->v_addr);
@@ -142,6 +144,10 @@
msm_pm_boot_after_pc
= msm_pm_config_rst_vector_after_pc;
} else {
+ warm_boot_ptr = ioremap_nocache(
+ MSM8625_WARM_BOOT_PHYS, SZ_64);
+ ret = msm_pm_boot_reset_vector_init(warm_boot_ptr);
+
entry = virt_to_phys(msm_pm_boot_entry);
/* Below sequence is a work around for cores
@@ -159,8 +165,8 @@
/* Here upper 16bits[16:31] used by CORE1
* lower 16bits[0:15] used by CORE0
*/
- entry = (pdata->p_addr) |
- ((pdata->p_addr & 0xFFFF0000) >> 16);
+ entry = (MSM8625_WARM_BOOT_PHYS |
+ ((MSM8625_WARM_BOOT_PHYS & 0xFFFF0000) >> 16));
/* write 'entry' to boot remapper register */
__raw_writel(entry, (pdata->v_addr +