msm: pm-8x60: Warmboot support for 9615
During warmboot, the boot remap register in the A5 core allows for a 64K
aligned warmboot handler to be remapped to the boot address. Use the
reserve callback in the machine_descriptor to allocate a memory block
that is aligned to 64K using memblock_alloc API. The boot remapper
address is programmed so as to remap the allocated memory to boot
address. The power management code programs into this memory to jump to
the warmboot resume path during power collapse.
Change-Id: I2cf9e5ca346ac0632c9e21152dc25f5541166077
Signed-off-by: Maheshkumar Sivasubramanian <msivasub@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index 15705ec..d8efcfe 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -1625,6 +1625,11 @@
},
};
+static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
+ .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_VIRT,
+ .v_addr = (uint32_t *)PAGE_OFFSET,
+};
+
static void
msm_i2c_gpio_config(int iface, int config_type)
{
@@ -1818,8 +1823,8 @@
msm_pm_set_platform_data(msm7x25_pm_data,
ARRAY_SIZE(msm7x25_pm_data));
- BUG_ON(msm_pm_boot_init(MSM_PM_BOOT_CONFIG_RESET_VECTOR,
- ioremap(0, PAGE_SIZE)));
+ BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
+
msm7x27_wlan_init();
}