diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-02-16 17:22:26 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-02-20 23:18:10 +0100 |
commit | 902626c23c5b56765900a7c8e3dded109f4044fa (patch) | |
tree | e967b1b7bb6623e4600ca8d79c67d181b5c15898 /src/northbridge/intel/nehalem | |
parent | 2ab8ec7cfb1c930fc188d6ac13040b3fd753c476 (diff) |
nehalem: Make SPD address map into parameter.
It's mobo dependent.
Change-Id: I7a9ba0fb7374a61178e9282acd8f10098435f1fd
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/5253
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/northbridge/intel/nehalem')
-rw-r--r-- | src/northbridge/intel/nehalem/raminit.c | 8 | ||||
-rw-r--r-- | src/northbridge/intel/nehalem/raminit.h | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/northbridge/intel/nehalem/raminit.c b/src/northbridge/intel/nehalem/raminit.c index 24c64eeb35..c5fe8ba926 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 b66b60e44d..91f0dea9c1 100644 --- a/src/northbridge/intel/nehalem/raminit.h +++ b/src/northbridge/intel/nehalem/raminit.h @@ -22,6 +22,13 @@ #include "nehalem.h" -void raminit(int s3resume); +/* spd_addrmap is array of 4 elements: + Channel 0 Slot 0 + Channel 0 Slot 1 + Channel 1 Slot 0 + Channel 1 Slot 1 + 0 means "not present" +*/ +void raminit(const int s3resume, const u8 *spd_addrmap); #endif /* RAMINIT_H */ |