From patchwork Wed Apr 10 20:17:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 235469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DD33B2C00AD for ; Thu, 11 Apr 2013 06:18:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936475Ab3DJURt (ORCPT ); Wed, 10 Apr 2013 16:17:49 -0400 Received: from zoneX.GCU-Squad.org ([194.213.125.0]:35397 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936455Ab3DJURr (ORCPT ); Wed, 10 Apr 2013 16:17:47 -0400 Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=endymion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1UQ1Sh-0007S9-KX (TLSv1:AES128-SHA:128) (envelope-from ) for linux-i2c@vger.kernel.org; Wed, 10 Apr 2013 22:17:43 +0200 Date: Wed, 10 Apr 2013 22:17:40 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 1/6] DDR3: Fix tRAS value Message-ID: <20130410221740.182105ce@endymion.delvare> In-Reply-To: <20130410221330.213ca5be@endymion.delvare> References: <20130410221330.213ca5be@endymion.delvare> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org DDR3: Use the right nibble from byte 21 as the MSB of tRAS. --- eeprom/decode-dimms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- i2c-tools.orig/eeprom/decode-dimms 2013-04-10 14:09:02.415218409 +0200 +++ i2c-tools/eeprom/decode-dimms 2013-04-10 14:11:18.839376112 +0200 @@ -1393,7 +1393,7 @@ sub decode_ddr3_sdram($) $taa = int($bytes->[16] / $bytes->[12]); $trcd = int($bytes->[18] / $bytes->[12]); $trp = int($bytes->[20] / $bytes->[12]); - $tras = int((($bytes->[21] >> 4) * 256 + $bytes->[22]) / $bytes->[12]); + $tras = int(((($bytes->[21] & 0x0f) << 8) + $bytes->[22]) / $bytes->[12]); printl("tCL-tRCD-tRP-tRAS", join("-", $taa, $trcd, $trp, $tras));