[PATCH] decode-dimms: Move SDR-specific code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
---
 eeprom/decode-dimms |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

--- i2c-tools.orig/eeprom/decode-dimms	2018-12-07 10:12:24.157535276 +0100
+++ i2c-tools/eeprom/decode-dimms	2018-12-07 10:46:39.795154479 +0100
@@ -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


-- 
Jean Delvare
SUSE L3 Support



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux