Skip to contentSkip to conversation

mpc83xx: Correct the burst length for DDR2 with 32 bits

PATCH New Dave Liu 2 participants 2 messages Aug 4, 2007 – Aug 9, 2007

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH v2 1/1 mpc83xx: Correct the burst length for DDR2 with 32 bits

The burst length should be 4 for DDR2 with 32 bits bus

---
 cpu/mpc83xx/spd_sdram.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
cpu/mpc83xx/spd_sdram.c +10 -3
index 647813f..2c17cee 100644
@@ -574,7 +574,10 @@ long int spd_sdram()
 
 	/* Check DIMM data bus width */
 	if (spd.dataw_lsb == 0x20) {
-		burstlen = 0x03; /* 32 bit data bus, burst len is 8 */
+		if (spd.mem_type == SPD_MEMTYPE_DDR)
+			burstlen = 0x03; /* 32 bit data bus, burst len is 8 */
+		if (spd.mem_type == SPD_MEMTYPE_DDR2)
+			burstlen = 0x02; /* 32 bit data bus, burst len is 4 */
 		printf("\n   DDR DIMM: data bus width is 32 bit");
 	} else {
 		burstlen = 0x02; /* Others act as 64 bit bus, burst len is 4 */
@@ -730,8 +733,12 @@ long int spd_sdram()
 		sdram_cfg |= 0x10000000;
 
 	/* The DIMM is 32bit width */
-	if (spd.dataw_lsb == 0x20)
-		sdram_cfg |= 0x000C0000;
+	if (spd.dataw_lsb == 0x20) {
+		if (spd.mem_type == SPD_MEMTYPE_DDR)
+			sdram_cfg |= 0x000C0000;
+		if (spd.mem_type == SPD_MEMTYPE_DDR2)
+			sdram_cfg |= 0x00080000;
+	}
 
 	ddrc_ecc_enable = 0;
 
Signature · 1 line
1.5.3.rc2.29.gc4640f
#1 lore raw

PATCH v2 1/1 mpc83xx: Correct the burst length for DDR2 with 32 bits

Quoted 3 lines · In message <[email protected]> you wrote:

The burst length should be 4 for DDR2 with 32 bits bus

Kim, I haven't found this one in your 83xx repo yet. Shall I apply it directly, of will you do that and send a new pull request?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You know that feeling when you're leaning back  on  a  stool  and  it
starts to tip over? Well, that's how I feel all the time.
- Steven Wright