summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorChenhui Zhao <chenhui.zhao@freescale.com>2014-12-08 09:55:13 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:41:56 (GMT)
commitfb3f709afe4ec260f310dd1569f589aafe8856be (patch)
treeff8fef5beee74b656c7b5f2dcb3072b934bba57c /arch/arm
parent84c4015050a4b0d063d17bfcba62aba637763521 (diff)
downloadlinux-fsl-qoriq-fb3f709afe4ec260f310dd1569f589aafe8856be.tar.xz
arm: ls1: only call ls1_pm_iomap() when doing deep sleep
ls1_pm_iomap() maps some register spaces for deep sleep, so do not call ls1_pm_iomap() when doing sleep. This patch also fixes a kernel BUG which happens when doing sleep on LS1021ATWR board. Signed-off-by: Chenhui Zhao <chenhui.zhao@freescale.com> Change-Id: I1e06222f6ee2f6c44f763d48d959680838db0551 Reviewed-on: http://git.am.freescale.net:8181/25476 Reviewed-by: Yang Li <LeoLi@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-imx/pm-ls1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/pm-ls1.c b/arch/arm/mach-imx/pm-ls1.c
index ad32c62..827a486 100644
--- a/arch/arm/mach-imx/pm-ls1.c
+++ b/arch/arm/mach-imx/pm-ls1.c
@@ -81,6 +81,7 @@ static u8 ddr_buff[DDR_BUF_SIZE] __aligned(64);
static struct ls1_pm_baseaddr ls1_pm_base;
/* supported sleep modes by the present platform */
static unsigned int sleep_modes;
+static suspend_state_t ls1_pm_state;
static void ls1_pm_iomap(void)
{
@@ -330,14 +331,18 @@ static int ls1_suspend_valid(suspend_state_t state)
static int ls1_suspend_begin(suspend_state_t state)
{
- ls1_pm_iomap();
+ ls1_pm_state = state;
+
+ if (ls1_pm_state == PM_SUSPEND_MEM)
+ ls1_pm_iomap();
return 0;
}
static void ls1_suspend_end(void)
{
- ls1_pm_uniomap();
+ if (ls1_pm_state == PM_SUSPEND_MEM)
+ ls1_pm_uniomap();
}
static const struct platform_suspend_ops ls1_suspend_ops = {