aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2013-04-13 16:27:15 +0000
committerJean Delvare <jdelvare@suse.de>2013-04-13 16:27:15 +0000
commit501890705f0fa3e8d9250c88dfda3d2c5a68ba5e (patch)
treef5368ec60dfc4369c5feb995f207af2b24d0f7eb
parent32c172530d72eb3de4f4a5e81e7f600abf98f701 (diff)
downloadi2c-tools-501890705f0fa3e8d9250c88dfda3d2c5a68ba5e.tar.gz
DDR3: Round core timings up, not down.
git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6130 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 3d9295b..5939e76 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,7 @@ SVN HEAD
Prevent hang on reserved DDR3 module type
Decode more DDR3 module types
Fix DDR3 tRAS decoding
+ Fix DDR3 core timings rounding
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 ed8181b..7473b3a 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1390,10 +1390,10 @@ sub decode_ddr3_sdram($)
my $trp;
my $tras;
- $taa = int($bytes->[16] / $bytes->[12]);
- $trcd = int($bytes->[18] / $bytes->[12]);
- $trp = int($bytes->[20] / $bytes->[12]);
- $tras = int(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]);
+ $taa = ceil($bytes->[16] / $bytes->[12]);
+ $trcd = ceil($bytes->[18] / $bytes->[12]);
+ $trp = ceil($bytes->[20] / $bytes->[12]);
+ $tras = ceil(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]);
printl("tCL-tRCD-tRP-tRAS", join("-", $taa, $trcd, $trp, $tras));