Browse Source

decode-dimms: Move SDR-specific code

SDR-specific code should go to its type-specific decoding function.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
tags/v4.2
Jean Delvare 7 years ago
parent
commit
4d476eb716
  1. 1
      CHANGES
  2. 12
      eeprom/decode-dimms

1
CHANGES

@ -3,6 +3,7 @@ i2c-tools CHANGES
master
decode-dimms: Print SPD revision for DDR3 too
Move SDR-specific code
4.1 (2018-11-30)
Makefile: Make STRIP, DESTDIR and PREFIX overridable

12
eeprom/decode-dimms

@ -741,7 +741,7 @@ sub sdram_module_configuration_type($)
return join ", ", @edc;
}
# Parameter: EEPROM bytes 0-127 (using 3-62)
# Parameter: EEPROM bytes 0-127 (using 3-62 and 126-127)
sub decode_sdr_sdram($)
{
my $bytes = shift;
@ -1000,6 +1000,9 @@ sub decode_sdr_sdram($)
$temp = (($bytes->[35] & 0x7f) >> 4) + ($bytes->[35] & 0xf) * 0.1;
printl_cond(($bytes->[35] & 0xf) <= 9, "Data Signal Hold Time",
(($bytes->[35] >> 7) ? -$temp : $temp) . " ns");
# Last 2 bytes (126-127) are reserved, Intel used them as an extension
decode_intel_spec_freq($bytes);
}
sub as_ddr($$)
@ -2693,13 +2696,6 @@ for $current (0 .. $#dimm) {
# memory types)
decode_manufacturing_information(\@bytes);
}
# Next 27 bytes (99-125) are manufacturer specific, can't decode
# Last 2 bytes (126-127) are reserved, Intel used them as an extension
if ($type eq "SDR SDRAM") {
decode_intel_spec_freq(\@bytes);
}
}
# Side-by-side output format is only possible if all DIMMs have a similar

Loading…
Cancel
Save