From 4aa36fe574b32d9f4a75c9ec1e60d566c84ecc3b Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 15 Apr 2013 14:28:55 +0000 Subject: [PATCH] DDR3: Round down PC3 numbers to comply with Jedec. git-svn-id: http://lm-sensors.org/svn/i2c-tools/branches/i2c-tools-3.1@6154 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + eeprom/decode-dimms | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGES b/CHANGES index 3feda87..0841c7d 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ SVN HEAD Decode more DDR3 module types Fix DDR3 tRAS decoding Fix DDR3 core timings rounding + Round down PC3 numbers to comply with Jedec 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 8073843..9b5fe09 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -1197,6 +1197,8 @@ sub decode_ddr3_sdram($) my $ddrclk = 2 * (1000 / $ctime); my $tbits = 1 << (($bytes->[8] & 7) + 3); my $pcclk = int ($ddrclk * $tbits / 8); + # Round down to comply with Jedec + $pcclk = $pcclk - ($pcclk % 100); $ddrclk = int ($ddrclk); printl("Maximum module speed", "$ddrclk MHz (PC3-${pcclk})");