From cbfef7739d3a6a746ba6abb0712d734e428068bc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 15 Apr 2013 14:27:56 +0000 Subject: [PATCH] DDR3: Round core timings up, not down. git-svn-id: http://lm-sensors.org/svn/i2c-tools/branches/i2c-tools-3.1@6153 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + eeprom/decode-dimms | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index d16f3f2..3feda87 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,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: Clarify the SMBus commands used for probing by default i2c-dev.h: Minimize differences with kernel flavor Move SMBus helper functions to include/i2c/smbus.h diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index 78da5e8..8073843 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -1225,10 +1225,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));