Skip to content
Snippets Groups Projects
Commit 856e4b0d authored by York Sun's avatar York Sun Committed by Kumar Gala
Browse files

powerpc/8xxx: Add additional cycle to write-to-read turnaound for DDR3


When DDR data rate is higher than 1200MT/s or controller interleaving is
enabled, additional cycle for write-to-read turnaround is needed to satisfy
dynamic ODT timing.

Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent b1d67857
No related branches found
No related tags found
No related merge requests found
...@@ -236,9 +236,12 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr, ...@@ -236,9 +236,12 @@ static void set_timing_cfg_0(fsl_ddr_cfg_regs_t *ddr,
* tAXPD=1, need design to confirm. * tAXPD=1, need design to confirm.
*/ */
int tXP = max((get_memory_clk_period_ps() * 3), 7500); /* unit=ps */ int tXP = max((get_memory_clk_period_ps() * 3), 7500); /* unit=ps */
unsigned int data_rate = fsl_ddr_get_mem_data_rate();
tmrd_mclk = 4; tmrd_mclk = 4;
/* set the turnaround time */ /* set the turnaround time */
trwt_mclk = 1; trwt_mclk = 1;
if ((data_rate/1000000 > 1150) || (popts->memctl_interleaving))
twrt_mclk = 1;
if (popts->dynamic_power == 0) { /* powerdown is not used */ if (popts->dynamic_power == 0) { /* powerdown is not used */
act_pd_exit_mclk = 1; act_pd_exit_mclk = 1;
......
...@@ -80,5 +80,5 @@ extern void check_interleaving_options(fsl_ddr_info_t *pinfo); ...@@ -80,5 +80,5 @@ extern void check_interleaving_options(fsl_ddr_info_t *pinfo);
extern unsigned int mclk_to_picos(unsigned int mclk); extern unsigned int mclk_to_picos(unsigned int mclk);
extern unsigned int get_memory_clk_period_ps(void); extern unsigned int get_memory_clk_period_ps(void);
extern unsigned int picos_to_mclk(unsigned int picos); extern unsigned int picos_to_mclk(unsigned int picos);
extern unsigned int fsl_ddr_get_mem_data_rate(void);
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment