diff mbox

[U-Boot,1/4] ARM: DRA7: emif: Fix updating of refresh ctrl shadow

Message ID 1457179351-971-2-git-send-email-lokeshvutla@ti.com
State Accepted
Commit de095474788d6731f71bf4ce2187d047e0e8ee9b
Delegated to: Tom Rini
Headers show

Commit Message

Lokesh Vutla March 5, 2016, 12:02 p.m. UTC
On DRA7, refresh ctrl shadow should be updated with
the final value.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/cpu/armv7/omap-common/emif-common.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Tom Rini March 7, 2016, 11:35 p.m. UTC | #1
On Sat, Mar 05, 2016 at 05:32:28PM +0530, Lokesh Vutla wrote:

> On DRA7, refresh ctrl shadow should be updated with
> the final value.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini March 15, 2016, 11:59 a.m. UTC | #2
On Sat, Mar 05, 2016 at 05:32:28PM +0530, Lokesh Vutla wrote:

> On DRA7, refresh ctrl shadow should be updated with
> the final value.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

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

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/cpu/armv7/omap-common/emif-common.c
index bf7bf26..90c241a 100644
--- a/arch/arm/cpu/armv7/omap-common/emif-common.c
+++ b/arch/arm/cpu/armv7/omap-common/emif-common.c
@@ -163,7 +163,11 @@  void emif_update_timings(u32 base, const struct emif_regs *regs)
 {
 	struct emif_reg_struct *emif = (struct emif_reg_struct *)base;
 
-	writel(regs->ref_ctrl, &emif->emif_sdram_ref_ctrl_shdw);
+	if (!is_dra7xx())
+		writel(regs->ref_ctrl, &emif->emif_sdram_ref_ctrl_shdw);
+	else
+		writel(regs->ref_ctrl_final, &emif->emif_sdram_ref_ctrl_shdw);
+
 	writel(regs->sdram_tim1, &emif->emif_sdram_tim_1_shdw);
 	writel(regs->sdram_tim2, &emif->emif_sdram_tim_2_shdw);
 	writel(regs->sdram_tim3, &emif->emif_sdram_tim_3_shdw);