Skip to content
Snippets Groups Projects
Commit d111d638 authored by Haiying Wang's avatar Haiying Wang Committed by Andrew Fleming-AFLEMING
Browse files

Empirically set cpo and clk_adjust for mpc85xx DDR2 support


This patch is against u-boot-mpc85xx.git of www.denx.com

Setting cpo to 0x9 for frequencies higher than 333MHz is verified on
both MPC8548CDS board and MPC8568MDS board, especially for supporting
533MHz DDR2.

Setting clk_adjust to 0x6(3/4 late cycle) for MPC8568MDS board is for
DDR2 on all current board versions especially ver 1.92 or later to bring
up.

Signed-off-by: default avatarHaiying Wang <Haiying.Wang@freescale.com>
parent 3db0bef5
No related branches found
No related tags found
No related merge requests found
...@@ -692,13 +692,10 @@ spd_sdram(void) ...@@ -692,13 +692,10 @@ spd_sdram(void)
*/ */
cpo = 0; cpo = 0;
if (spd.mem_type == SPD_MEMTYPE_DDR2) { if (spd.mem_type == SPD_MEMTYPE_DDR2) {
if (effective_data_rate == 266 || effective_data_rate == 333) { if (effective_data_rate <= 333) {
cpo = 0x7; /* READ_LAT + 5/4 */ cpo = 0x7; /* READ_LAT + 5/4 */
} else if (effective_data_rate == 400) {
cpo = 0x9; /* READ_LAT + 7/4 */
} else { } else {
/* Pure speculation */ cpo = 0x9; /* READ_LAT + 7/4 */
cpo = 0xb;
} }
} }
...@@ -905,7 +902,12 @@ spd_sdram(void) ...@@ -905,7 +902,12 @@ spd_sdram(void)
if (spd.mem_type == SPD_MEMTYPE_DDR) if (spd.mem_type == SPD_MEMTYPE_DDR)
clk_adjust = 0x6; clk_adjust = 0x6;
else else
#ifdef CONFIG_MPC8568
/* Empirally setting clk_adjust */
clk_adjust = 0x6;
#else
clk_adjust = 0x7; clk_adjust = 0x7;
#endif
ddr->sdram_clk_cntl = (0 ddr->sdram_clk_cntl = (0
| 0x80000000 | 0x80000000
......
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