From patchwork Mon Oct 26 16:15:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 55934 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9QGUkaf021228 for ; Mon, 26 Oct 2009 16:30:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751591AbZJZQaj (ORCPT ); Mon, 26 Oct 2009 12:30:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751645AbZJZQaj (ORCPT ); Mon, 26 Oct 2009 12:30:39 -0400 Received: from smtp.nokia.com ([192.100.122.233]:54269 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbZJZQai (ORCPT ); Mon, 26 Oct 2009 12:30:38 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9QGURF5030856; Mon, 26 Oct 2009 18:30:40 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 26 Oct 2009 18:30:33 +0200 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 26 Oct 2009 18:30:26 +0200 Received: from localhost.localdomain (sokoban.ntc.nokia.com [172.22.144.95]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9QGUKld018261; Mon, 26 Oct 2009 18:30:25 +0200 From: Tero Kristo To: linux-omap@vger.kernel.org Cc: Kalle Jokiniemi Subject: [PATCH 4/4] RX51: Fix SDRAM RFR timings calculation Date: Mon, 26 Oct 2009 18:15:26 +0200 Message-Id: <1256573726-29800-5-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1256573726-29800-4-git-send-email-tero.kristo@nokia.com> References: <> <1256573726-29800-1-git-send-email-tero.kristo@nokia.com> <1256573726-29800-2-git-send-email-tero.kristo@nokia.com> <1256573726-29800-3-git-send-email-tero.kristo@nokia.com> <1256573726-29800-4-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 26 Oct 2009 16:30:26.0651 (UTC) FILETIME=[9FCC12B0:01CA5659] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/board-rx51-sdram.c b/arch/arm/mach-omap2/board-rx51-sdram.c index 237b898..f3b9917 100644 --- a/arch/arm/mach-omap2/board-rx51-sdram.c +++ b/arch/arm/mach-omap2/board-rx51-sdram.c @@ -166,7 +166,7 @@ static int set_sdrc_timing_regval_ps(u32 *regval, int st_bit, int end_bit, static int sdrc_timings(int id, long rate) { - u32 ticks_per_us; + u32 ticks_per_ms; u32 rfr, l; u32 actim_ctrla = 0, actim_ctrlb = 0; u32 rfr_ctrl; @@ -192,8 +192,8 @@ static int sdrc_timings(int id, long rate) SDRC_SET_ONE(&actim_ctrlb, 12, 14, tCKE, l3_rate); SDRC_SET_ONE(&actim_ctrlb, 16, 17, tWTR, l3_rate); - ticks_per_us = sdrc_ps_to_ticks(1000000, l3_rate); - rfr = rx51_timings[0].tREF * ticks_per_us / 1000; + ticks_per_ms = l3_rate; + rfr = rx51_timings[0].tREF * ticks_per_ms / 1000000; if (rfr > 65535 + 50) rfr = 65535; else