summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-08-10 20:34:17 +0200
committerFelix Held <felix-coreboot@felixheld.de>2019-09-06 00:15:02 +0000
commit8bb2bace8689089af5659ad3108877e397885ff2 (patch)
treed0c6b3672bbcd82d0e7244c4ab5bcf123264c95a /src
parent66922d05d7e641d2dafc8ff1c5911491fa9ba1ed (diff)
downloadcoreboot-8bb2bace8689089af5659ad3108877e397885ff2.tar.xz
nb/intel/x4x/raminit: Move dummy reads after JEDEC init
Vendor only does dummy reads right after JEDEC init is finished and dram init was marked as finished. Dummy reads also make much more sense after JEDEC init as a way to send a few JEDEC commands, presumably as a way to make sure it is ready. TESTED on ga-g41m-es2l (still boots fine) Change-Id: I8069f9c08ad5e5268ddbe3711d58bc42522f938c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/20979 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/x4x/raminit_ddr23.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/northbridge/intel/x4x/raminit_ddr23.c b/src/northbridge/intel/x4x/raminit_ddr23.c
index 1e40b9c511..efdcbb637a 100644
--- a/src/northbridge/intel/x4x/raminit_ddr23.c
+++ b/src/northbridge/intel/x4x/raminit_ddr23.c
@@ -2156,6 +2156,15 @@ void do_raminit(struct sysinfo *s, int fast_boot)
MCHBAR32_OR(0x400*ch + 0x268, 0xc0000000);
}
+ // Dummy reads
+ if (s->boot_path == BOOT_PATH_NORMAL) {
+ FOR_EACH_POPULATED_RANK(s->dimms, ch, r) {
+ for (bank = 0; bank < 4; bank++)
+ read32((u32 *)(test_address(ch, r) | 0x800000 | (bank << 12)));
+ }
+ }
+ printk(BIOS_DEBUG, "Done dummy reads\n");
+
// Receive enable
sdram_program_receive_enable(s, fast_boot);
printk(BIOS_DEBUG, "Done rcven\n");
@@ -2171,28 +2180,6 @@ void do_raminit(struct sysinfo *s, int fast_boot)
MCHBAR8_AND(0x5dc, ~0x80);
MCHBAR8_OR(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 = test_address(ch, r) |
- (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
if (!fast_boot) {