From patchwork Wed Apr 10 20:18:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 235470 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 26DC82C00BB for ; Thu, 11 Apr 2013 06:18:40 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935970Ab3DJUSj (ORCPT ); Wed, 10 Apr 2013 16:18:39 -0400 Received: from zoneX.GCU-Squad.org ([194.213.125.0]:32580 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935153Ab3DJUSi (ORCPT ); Wed, 10 Apr 2013 16:18:38 -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 1UQ1TX-00062V-O4 (TLSv1:AES128-SHA:128) (envelope-from ) for linux-i2c@vger.kernel.org; Wed, 10 Apr 2013 22:18:35 +0200 Date: Wed, 10 Apr 2013 22:18:32 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 2/6] DDR3: Fix core timings rounding Message-ID: <20130410221832.34f38cd2@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: Round core timings up, not down. --- eeprom/decode-dimms | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2013-04-10 14:29:35.349802212 +0200 +++ i2c-tools/eeprom/decode-dimms 2013-04-10 14:30:19.753833437 +0200 @@ -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));