All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] fsl-ddr: Fix power-down timing settings
@ 2009-12-16 16:24 Kumar Gala
  2009-12-16 16:24 ` [U-Boot] [PATCH 2/4] fsl-ddr: add the override for write leveling Kumar Gala
  2009-12-16 16:27 ` [U-Boot] [PATCH 1/4] fsl-ddr: Fix power-down timing settings Kumar Gala
  0 siblings, 2 replies; 10+ messages in thread
From: Kumar Gala @ 2009-12-16 16:24 UTC (permalink / raw)
  To: u-boot

From: Dave Liu <daveliu@freescale.com>

1. TIMING_CFG_0[ACT_PD_EXIT] was set to 6 clocks, but
   It should be set to tXP parameter, tXP=max(3CK, 7.5ns)
2. TIMING_CFG_0[PRE_PD_EXIT] was set to 6 clocks, but
   It should be set to tXP (if MR0[A12]=1) else to tXPDLL parameter
   We are setting the mode register MR0[A12]='1'

Signed-off-by: Dave Liu <daveliu@freescale.com>
---
 cpu/mpc8xxx/ddr/ctrl_regs.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/cpu/mpc8xxx/ddr/ctrl_regs.c b/cpu/mpc8xxx/ddr/ctrl_regs.c
index 2505041..a92f1a3 100644
--- a/cpu/mpc8xxx/ddr/ctrl_regs.c
+++ b/cpu/mpc8xxx/ddr/ctrl_regs.c
@@ -188,12 +188,13 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr)
 	 * The DDR3 spec has not tXARD,
 	 * we use the tXP instead of it.
 	 * tXP=max(3nCK, 7.5ns) for DDR3.
-	 * we use the tXP=6
 	 * spec has not the tAXPD, we use
 	 * tAXPD=8, need design to confirm.
 	 */
-	act_pd_exit_mclk = 6;
-	pre_pd_exit_mclk = 6;
+	int tXP = max((get_memory_clk_period_ps() * 3), 7500); /* unit=ps */
+	act_pd_exit_mclk = picos_to_mclk(tXP);
+	/* Mode register MR0[A12] is '1' - fast exit */
+	pre_pd_exit_mclk = act_pd_exit_mclk;
 	taxpd_mclk = 8;
 	tmrd_mclk = 4;
 #else /* CONFIG_FSL_DDR2 */
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-01-04 17:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16 16:24 [U-Boot] [PATCH 1/4] fsl-ddr: Fix power-down timing settings Kumar Gala
2009-12-16 16:24 ` [U-Boot] [PATCH 2/4] fsl-ddr: add the override for write leveling Kumar Gala
2009-12-16 16:24   ` [U-Boot] [PATCH 3/4] fsl-ddr: add override for the Rtt_WR Kumar Gala
2009-12-16 16:24     ` [U-Boot] [PATCH 4/4] fsl-ddr: setup ODT_RD_CFG & ODT_WR_CFG when we interleave Kumar Gala
2009-12-16 16:29       ` Kumar Gala
2009-12-16 16:29     ` [U-Boot] [PATCH 3/4] fsl-ddr: add override for the Rtt_WR Kumar Gala
2009-12-17 21:20     ` Wolfgang Denk
2010-01-04 17:37       ` Kumar Gala
2009-12-16 16:29   ` [U-Boot] [PATCH 2/4] fsl-ddr: add the override for write leveling Kumar Gala
2009-12-16 16:27 ` [U-Boot] [PATCH 1/4] fsl-ddr: Fix power-down timing settings Kumar Gala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.