diff mbox

[U-Boot,09/10] ARM: AM43xx: Write sdram_config to secure_emif_sdram_config

Message ID 1392726721-12169-9-git-send-email-trini@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Feb. 18, 2014, 12:32 p.m. UTC
From: Dave Gerlach <d-gerlach@ti.com>

The register secure_emif_sdram_config in control module is copied to
the EMIF sdram_config register when it is coming out of DeepSleep0 in
order to ensure that the EMIF comes up for the correct type of DDR.
Without this, resume can hang from within the kernel.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
 arch/arm/cpu/armv7/am33xx/ddr.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Tom Rini March 4, 2014, 7:14 p.m. UTC | #1
On Tue, Feb 18, 2014 at 07:32:00AM -0500, Tom Rini wrote:

> From: Dave Gerlach <d-gerlach@ti.com>
> 
> The register secure_emif_sdram_config in control module is copied to
> the EMIF sdram_config register when it is coming out of DeepSleep0 in
> order to ensure that the EMIF comes up for the correct type of DDR.
> Without this, resume can hang from within the kernel.
> 
> Signed-off-by: Dave Gerlach <d-gerlach@ti.com>

Applied to u-boot-ti/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/ddr.c b/arch/arm/cpu/armv7/am33xx/ddr.c
index 4173a10..9a625c4 100644
--- a/arch/arm/cpu/armv7/am33xx/ddr.c
+++ b/arch/arm/cpu/armv7/am33xx/ddr.c
@@ -96,6 +96,7 @@  void config_sdram_emif4d5(const struct emif_regs *regs, int nr)
 
 	writel(regs->ref_ctrl, &emif_reg[nr]->emif_sdram_ref_ctrl);
 	writel(regs->sdram_config, &emif_reg[nr]->emif_sdram_config);
+	writel(regs->sdram_config, &cstat->secure_emif_sdram_config);
 
 	if (emif_sdram_type() == EMIF_SDRAM_TYPE_LPDDR2) {
 		configure_mr(nr, 0);