summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-13 16:29:17 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-13 16:29:17 +0000
commit41bb210d0f69d6b8caa6cc8c030379071d5240d7 (patch)
tree9ec4c3b86308bf245631556106e389f5d2ba34c6
parent2a6dfc6492c9b72c4ce00b2a2f1fbe1ba5195bdf (diff)
downloadi2c-tools-41bb210d0f69d6b8caa6cc8c030379071d5240d7.tar.gz
DDR3: Don't print the medium and fine time bases, they aren't directly
useful to the user. Simply store them for later use. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6132 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms18
2 files changed, 10 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index 5449d1f..c8d0138 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,7 @@ SVN HEAD
Fix DDR3 tRAS decoding
Fix DDR3 core timings rounding
Round down PC3 numbers to comply with Jedec
+ Don't print the DDR3 time bases
i2cdetect: Do a best effort detection if functionality is missing
Clarify the SMBus commands used for probing by default
i2c-dev.h: Minimize differences with kernel flavor
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index 3ac3694..f2d1663 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1335,6 +1335,7 @@ sub decode_ddr3_sdram($)
my $bytes = shift;
my $temp;
my $ctime;
+ my ($ftb, $mtb);
my @module_types = ("Undefined", "RDIMM", "UDIMM", "SO-DIMM",
"Micro-DIMM", "Mini-RDIMM", "Mini-UDIMM",
@@ -1346,18 +1347,17 @@ sub decode_ddr3_sdram($)
$module_types[$bytes->[3]] :
sprintf("Reserved (0x%.2X)", $bytes->[3]));
+# time bases
+ if (($bytes->[9] & 0x0f) == 0 || $bytes->[11] == 0) {
+ print STDERR "Invalid time base divisor, can't decode\n";
+ return;
+ }
+ $ftb = ($bytes->[9] >> 4) / ($bytes->[9] & 0x0f);
+ $mtb = $bytes->[10] / $bytes->[11];
+
# speed
prints("Memory Characteristics");
- my $dividend = ($bytes->[9] >> 4) & 15;
- my $divisor = $bytes->[9] & 15;
- printl("Fine time base", sprintf("%.3f", $dividend / $divisor) . " ps");
-
- $dividend = $bytes->[10];
- $divisor = $bytes->[11];
- my $mtb = $dividend / $divisor;
- printl("Medium time base", tns3($mtb));
-
$ctime = $bytes->[12] * $mtb;
my $ddrclk = 2 * (1000 / $ctime);
my $tbits = 1 << (($bytes->[8] & 7) + 3);