summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1102fb)
raw | patch | inline | side by side (parent: d1102fb)
author | Dave Gerlach <d-gerlach@ti.com> | |
Thu, 8 Jan 2015 01:06:38 +0000 (19:06 -0600) | ||
committer | Dave Gerlach <d-gerlach@ti.com> | |
Fri, 9 Jan 2015 22:35:59 +0000 (16:35 -0600) |
AM437x offers a CKE override register within the control module that
allows the SoC to take control of the CKE line from the EMIF in order to
forcibly hold it low during suspend in order to prevent glitches and
keep the DDR properly in self-refresh.
Previously this was used as described in the suspend and resume path but
more recently it has been shown to cause hangs during suspend, so remove
the toggling of the bits along with all support code as suspend seems to
work better without it.
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
allows the SoC to take control of the CKE line from the EMIF in order to
forcibly hold it low during suspend in order to prevent glitches and
keep the DDR properly in self-refresh.
Previously this was used as described in the suspend and resume path but
more recently it has been shown to cause hangs during suspend, so remove
the toggling of the bits along with all support code as suspend seems to
work better without it.
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
arch/arm/mach-omap2/pm33xx.c | patch | blob | history | |
arch/arm/mach-omap2/pm33xx.h | patch | blob | history | |
arch/arm/mach-omap2/sleep43xx.S | patch | blob | history |
index 95aef0e3443ddbcbf7aff77131f277ebeac14cd4..a17a680a5eec2cc78a9304dac47ebade210557f2 100644 (file)
return -ENOMEM;
}
- susp_params.cke_override_virt =
- ioremap(AM43XX_CTRL_CKE_OVERRIDE, SZ_4);
-
- if (!susp_params.cke_override_virt) {
- pr_err("PM: Could not ioremap CKE override in Control Module\n");
- return -ENOMEM;
- }
-
/* Physical resume address to be used by ROM code */
am33xx_pm->ipc.reg0 = (AM33XX_OCMC_END -
am43xx_do_wfi_sz + am43xx_resume_offset + 0x4);
index d8a3c3b667dc25c498a2e466f515967dec90d813..8c4f45995b630519991dbb95fb822c5c0f5e00eb 100644 (file)
void __iomem *dram_sync;
void __iomem *rtc_base;
void __iomem *l2_base_virt;
- void __iomem *cke_override_virt;
};
void wkup_m3_reset_data_pos(void);
#define AM43XX_CM_BASE 0x44DF0000
-#define AM43XX_CTRL_CKE_OVERRIDE 0x44E1131C
-
#define AM43XX_CM_REGADDR(inst, reg) \
AM33XX_L4_WK_IO_ADDRESS(AM43XX_CM_BASE + (inst) + (reg))
index 6b00982309f038294957a30aa2bab8d5ccee84d3..e0aba1ca11f2a7a98bb88fe86a2bdf59dc6cfb58 100644 (file)
* 3) dram_sync_word - uncached word in SDRAM
* 4) rtc_base_addr - ioremapped RTC base address
* 5) l2_virt_base - L2CC ioremapped address for AM437x
- * 6) cke_override_virt - CKE override virtual address
*
* The code loads these values taking r0 value as reference to
* the array in registers starting from r0, i.e emif_addr_virt
str r3, dram_sync_word
str r4, rtc_base_addr
str r5, l2_base_virt
- str r6, cke_override_virt
ldr r0, emif_addr_virt
/* Save EMIF configuration */
cmp r2, r3
bne wait_emif_disable
- /*enable CKE override for both CKE0 and CKE1*/
- /*ensures CKE stays low throughout sleep*/
- ldr r2, cke_override_virt
- mov r1, #0
- str r1, [r2]
-
ldr r1, wfi_flags
tst r1, #WFI_RTC_ONLY
beq am43xx_deep_sleep_suspend
cmp r2, r3
bne wait_emif_enable
- /* disable CKE override for both CKE0 and CKE1 */
- ldr r2, cke_override_virt
- mov r1, #3
- str r1, [r2]
-
/* Disable EMIF self-refresh */
ldr r0, emif_addr_virt
ldr r1, [r0, #EMIF_POWER_MANAGEMENT_CONTROL]
cmp r2, #AM43XX_EMIF_PHY_CTRL_REG_COUNT
bne ddr_phy_ctrl_restore
- /*disable CKE override for both CKE0 and CKE1*/
- ldr r2, cke_override_phys
- mov r1, #3
- str r1, [r2]
-
/*
* Toggle EMIF to exit refresh mode:
* if EMIF lost context, PWR_MGT_CTRL is currently 0, writing disable
rtc_base_addr:
.word (0xdeadbeef)
-cke_override_virt:
- .word 0xDEADBEEF
-cke_override_phys:
- .word AM43XX_CTRL_CKE_OVERRIDE
-
am43xx_phys_emif_poweroff:
.word (AM43XX_CM_BASE + AM43XX_PRM_DEVICE_INST + \
AM43XX_PRM_EMIF_CTRL_OFFSET)