[coreboot-gerrit] Change in coreboot[master]: [UNTESTED] nb/intel/x4x/raminit: Move dummy reads after JEDEC init

Arthur Heymans (Code Review) gerrit at coreboot.org
Sun Aug 13 09:54:25 CEST 2017


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/20979


Change subject: [UNTESTED] nb/intel/x4x/raminit: Move dummy reads after JEDEC init
......................................................................

[UNTESTED] nb/intel/x4x/raminit: Move dummy reads after JEDEC init

Vendor only does dummy reads and right after JEDEC init is finished
and dram init was marked as finished.

Change-Id: I8069f9c08ad5e5268ddbe3711d58bc42522f938c
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/northbridge/intel/x4x/raminit_ddr2.c
1 file changed, 13 insertions(+), 22 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/20979/1

diff --git a/src/northbridge/intel/x4x/raminit_ddr2.c b/src/northbridge/intel/x4x/raminit_ddr2.c
index bc012d2..8ec2c79 100644
--- a/src/northbridge/intel/x4x/raminit_ddr2.c
+++ b/src/northbridge/intel/x4x/raminit_ddr2.c
@@ -2008,6 +2008,19 @@
 		MCHBAR32(0x400*ch + 0x268) = (MCHBAR32(0x400*ch + 0x268) & ~0xc0000000) | 0xc0000000;
 	}
 
+	// Dummy reads
+	if (s->boot_path == BOOT_PATH_NORMAL) {
+		volatile u32 data;
+		FOR_EACH_POPULATED_RANK(s->dimms, ch, r) {
+			for (bank = 0; bank < 4; bank++) {
+				data = read32((u32 *)((ch << 29)
+					| (r * 0x08000000) | (0x800000)
+					| (bank << 12)));
+			}
+		}
+	}
+	printk(BIOS_DEBUG, "Done dummy reads\n");
+
 	// Receive enable
 	sdram_program_receive_enable(s);
 	printk(BIOS_DEBUG, "Done rcven\n");
@@ -2022,28 +2035,6 @@
 	MCHBAR8(0x5dc) = MCHBAR8(0x5dc) | 0x80;
 	MCHBAR8(0x5dc) = MCHBAR8(0x5dc) & ~0x80;
 	MCHBAR8(0x5dc) = MCHBAR8(0x5dc) | 0x80;
-
-	// Dummy writes / reads
-	if (s->boot_path == BOOT_PATH_NORMAL) {
-		volatile u32 data;
-		FOR_EACH_POPULATED_RANK(s->dimms, ch, r) {
-			for (bank = 0; bank < 4; bank++) {
-				reg32 = (ch << 29) | (r*0x8000000) |
-					(bank << 12);
-				write32((u32 *)reg32, 0xffffffff);
-				data = read32((u32 *)reg32);
-				printk(BIOS_DEBUG, "Wrote ones,");
-				printk(BIOS_DEBUG, "  Read: [0x%08x]=0x%08x\n",
-					reg32, data);
-				write32((u32 *)reg32, 0x00000000);
-				data = read32((u32 *)reg32);
-				printk(BIOS_DEBUG, "Wrote zeros,");
-				printk(BIOS_DEBUG, " Read: [0x%08x]=0x%08x\n",
-					reg32, data);
-			}
-		}
-	}
-	printk(BIOS_DEBUG, "Done dummy reads\n");
 
 	// XXX tRD
 

-- 
To view, visit https://review.coreboot.org/20979
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8069f9c08ad5e5268ddbe3711d58bc42522f938c
Gerrit-Change-Number: 20979
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170813/f852e39f/attachment-0001.html>


More information about the coreboot-gerrit mailing list