[coreboot-gerrit] Patch set updated for coreboot: c135aac nehalem: Make SPD address map into parameter.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Wed Feb 19 22:22:06 CET 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5253

-gerrit

commit c135aaca9bda7f85ad50f2b643f50fbe47248b27
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Sun Feb 16 17:22:26 2014 +0100

    nehalem: Make SPD address map into parameter.
    
    It's mobo dependent.
    
    Change-Id: I7a9ba0fb7374a61178e9282acd8f10098435f1fd
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/mainboard/lenovo/x201/romstage.c    | 3 ++-
 src/northbridge/intel/nehalem/Kconfig   | 1 +
 src/northbridge/intel/nehalem/raminit.c | 8 ++++----
 src/northbridge/intel/nehalem/raminit.h | 2 +-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/mainboard/lenovo/x201/romstage.c b/src/mainboard/lenovo/x201/romstage.c
index f0874d3..07687b8 100644
--- a/src/mainboard/lenovo/x201/romstage.c
+++ b/src/mainboard/lenovo/x201/romstage.c
@@ -207,6 +207,7 @@ void main(unsigned long bist)
 {
 	u32 reg32;
 	int s3resume = 0;
+	const u8 spd_addrmap[4] = { 0x50, 0, 0x51, 0 };
 
 	timestamp_init(rdtsc ());
 
@@ -286,7 +287,7 @@ void main(unsigned long bist)
 
 	timestamp_add_now(TS_BEFORE_INITRAM);
 
-	raminit(s3resume);
+	raminit(s3resume, spd_addrmap);
 
 	timestamp_add_now(TS_AFTER_INITRAM);
 
diff --git a/src/northbridge/intel/nehalem/Kconfig b/src/northbridge/intel/nehalem/Kconfig
index 69d0eee..4cbaf22 100644
--- a/src/northbridge/intel/nehalem/Kconfig
+++ b/src/northbridge/intel/nehalem/Kconfig
@@ -23,6 +23,7 @@ config NORTHBRIDGE_INTEL_NEHALEM
 	select MMCONF_SUPPORT
 	select MMCONF_SUPPORT_DEFAULT
 	select VGA
+	select INTEL_EDID
 
 if NORTHBRIDGE_INTEL_NEHALEM
 
diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c
index a855982..c503555 100644
--- a/src/northbridge/intel/nehalem/raminit.c
+++ b/src/northbridge/intel/nehalem/raminit.c
@@ -3810,7 +3810,7 @@ set_fsb_frequency (void)
 }
 #endif
 
-void raminit(const int s3resume)
+void raminit(const int s3resume, const u8 *spd_addrmap)
 {
 	unsigned channel, slot, lane, rank;
 	int i;
@@ -3956,10 +3956,10 @@ void raminit(const int s3resume)
 					    0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
 					    0x95
 				};
-				if (slot)
+				if (!spd_addrmap[2 * channel + slot])
 					continue;
 				for (try = 0; try < 5; try++) {
-					v = smbus_read_byte(0x50 + channel,
+					v = smbus_read_byte(spd_addrmap[2 * channel + slot],
 							    DEVICE_TYPE);
 					if (v >= 0)
 						break;
@@ -3973,7 +3973,7 @@ void raminit(const int s3resume)
 					gav(info.
 					    spd[channel][0][useful_addresses
 							    [addr]] =
-					    smbus_read_byte(0x50 + channel,
+					    smbus_read_byte(spd_addrmap[2 * channel + slot],
 							    useful_addresses
 							    [addr]));
 				if (info.spd[channel][0][DEVICE_TYPE] != 11)
diff --git a/src/northbridge/intel/nehalem/raminit.h b/src/northbridge/intel/nehalem/raminit.h
index b66b60e..381c317 100644
--- a/src/northbridge/intel/nehalem/raminit.h
+++ b/src/northbridge/intel/nehalem/raminit.h
@@ -22,6 +22,6 @@
 
 #include "nehalem.h"
 
-void raminit(int s3resume);
+void raminit(const int s3resume, const u8 *spd_addrmap);
 
 #endif				/* RAMINIT_H */



More information about the coreboot-gerrit mailing list