diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2017-09-21 09:12:42 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2017-09-25 13:35:48 +0000 |
commit | 5661945c3b002da06ecef184df4d92a19fcabd58 (patch) | |
tree | 9400913c688429210f7b91a94815a52dc566639a /src/northbridge/intel/i945 | |
parent | c8bc983673cb2e700e0e65299c4471721f273818 (diff) | |
download | coreboot-5661945c3b002da06ecef184df4d92a19fcabd58.tar.xz |
nb/i945/raminit: Don't fall back to smbus read on failed SPD decode
SPD decoding problems are no longer a good method for detecting if i2c
byte read failed, since the return value of i2c_block_read is checked.
Change-Id: I230aa22964c452cf28a9370c927b82c57e39cc62
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/21621
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge/intel/i945')
-rw-r--r-- | src/northbridge/intel/i945/raminit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c index ddbff7fe7e..b350b67fb7 100644 --- a/src/northbridge/intel/i945/raminit.c +++ b/src/northbridge/intel/i945/raminit.c @@ -387,8 +387,7 @@ static void gather_common_timing(struct sys_info *sysinfo, printk(BIOS_DEBUG, "Reading SPD using i2c block operation.\n"); if (IS_ENABLED(CONFIG_DEBUG_RAM_SETUP) && bytes_read > 0) hexdump(raw_spd, bytes_read); - if (bytes_read != 64 || spd_decode_ddr2(&dimm_info, raw_spd) - != SPD_STATUS_OK) { + if (bytes_read != 64) { /* Try again with SMBUS byte read */ printk(BIOS_DEBUG, "i2c block operation failed," " trying smbus byte operation.\n"); @@ -396,10 +395,14 @@ static void gather_common_timing(struct sys_info *sysinfo, raw_spd[j] = spd_read_byte(device, j); if (IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)) hexdump(raw_spd, 64); - if (spd_decode_ddr2(&dimm_info, raw_spd) - != SPD_STATUS_OK) - continue; } + + if (spd_decode_ddr2(&dimm_info, raw_spd) != SPD_STATUS_OK) { + printk(BIOS_WARNING, "Encountered problems with SPD, " + "skipping this DIMM.\n"); + continue; + } + if (IS_ENABLED(CONFIG_DEBUG_RAM_SETUP)) dram_print_spd_ddr2(&dimm_info); |