From 42daf8575d06ae4f2280fa49b2a80b50dab92da1 Mon Sep 17 00:00:00 2001 From: Chenhui Zhao Date: Wed, 4 Mar 2015 14:13:06 +0800 Subject: arm: ls1021a: OCRAM1 does not power down in deep sleep In the case of SD boot, system can't wake from deep sleep if OCRAM1 is powered down. Therefore, keep it on when doing deep sleep. Signed-off-by: Chenhui Zhao Change-Id: Ib5f6b1c46f7c66e83595fc4fbe17789e557adee9 Reviewed-on: http://git.am.freescale.net:8181/31996 Tested-by: Review Code-CDREVIEW Reviewed-by: Yuantian Tang Reviewed-by: Zhengxiong Jin diff --git a/arch/arm/mach-imx/pm-ls1.c b/arch/arm/mach-imx/pm-ls1.c index b5d0f7d..f239b67 100644 --- a/arch/arm/mach-imx/pm-ls1.c +++ b/arch/arm/mach-imx/pm-ls1.c @@ -62,6 +62,7 @@ #define CCSR_RCPM_IPPDEXPCR1 0x144 #define CCSR_RCPM_IPPDEXPCR1_LPUART 0x40000000 #define CCSR_RCPM_IPPDEXPCR1_FLEXTIMER 0x20000000 +#define CCSR_RCPM_IPPDEXPCR1_OCRAM1 0x10000000 #define QIXIS_CTL_SYS 0x5 #define QIXIS_CTL_SYS_EVTSW_MASK 0x0c @@ -187,7 +188,12 @@ static void ls1_clear_pmc_int(void) static void ls1_set_powerdown(void) { iowrite32be(ippdexpcr0, ls1_pm_base.rcpm + CCSR_RCPM_IPPDEXPCR0); - iowrite32be(ippdexpcr1, ls1_pm_base.rcpm + CCSR_RCPM_IPPDEXPCR1); + /* + * In the case of SD boot, system can't wake from deep sleep + * if OCRAM1 is powered down. Therefore, keep it on. + */ + ippdexpcr1 |= CCSR_RCPM_IPPDEXPCR1_OCRAM1; + iowrite32be(ippdexpcr1, ls1_pm_base.rcpm + CCSR_RCPM_IPPDEXPCR1); } static void ls1_save_ddr(void *base) -- cgit v0.10.2