From patchwork Thu Jul 3 07:24:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 366611 X-Patchwork-Delegate: yorksun@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E82D41400A7 for ; Thu, 3 Jul 2014 18:11:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3EB94B606; Thu, 3 Jul 2014 10:11:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-MIczII93cn; Thu, 3 Jul 2014 10:11:11 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F4274B585; Thu, 3 Jul 2014 10:10:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6CB044B61E for ; Thu, 3 Jul 2014 10:10:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ngRC85fYuo6X for ; Thu, 3 Jul 2014 10:10:30 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2lp0206.outbound.protection.outlook.com [207.46.163.206]) by theia.denx.de (Postfix) with ESMTPS id 6C1F4A73EB for ; Thu, 3 Jul 2014 10:10:05 +0200 (CEST) Received: from DM2PR03CA009.namprd03.prod.outlook.com (10.141.52.157) by BLUPR03MB373.namprd03.prod.outlook.com (10.141.75.145) with Microsoft SMTP Server (TLS) id 15.0.969.15; Thu, 3 Jul 2014 08:09:52 +0000 Received: from BL2FFO11FD008.protection.gbl (2a01:111:f400:7c09::169) by DM2PR03CA009.outlook.office365.com (2a01:111:e400:2414::29) with Microsoft SMTP Server (TLS) id 15.0.974.11 via Frontend Transport; Thu, 3 Jul 2014 08:09:52 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD008.mail.protection.outlook.com (10.173.161.4) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Thu, 3 Jul 2014 08:09:51 +0000 Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s6389QNX008094; Thu, 3 Jul 2014 01:09:45 -0700 From: Alison Wang To: , , Date: Thu, 3 Jul 2014 15:24:21 +0800 Message-ID: <1404372264-2301-8-git-send-email-b18965@freescale.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1404372264-2301-1-git-send-email-b18965@freescale.com> References: <1404372264-2301-1-git-send-email-b18965@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(54534003)(199002)(189002)(81342001)(26826002)(99396002)(92566001)(106466001)(81542001)(85852003)(33646001)(93916002)(102836001)(74662001)(87286001)(87936001)(85306003)(89996001)(105606002)(6806004)(88136002)(84676001)(104166001)(62966002)(104016002)(107046002)(77982001)(95666004)(2201001)(21056001)(74502001)(50226001)(4396001)(19580395003)(50466002)(68736004)(81156004)(69596002)(46102001)(97736001)(92726001)(31966008)(80022001)(77156001)(19580405001)(83072002)(229853001)(36756003)(20776003)(64706001)(48376002)(76482001)(50986999)(79102001)(47776003)(83322001)(76176999)(44976005)(42262001); DIR:OUT; SFP:; SCL:1; SRVR:BLUPR03MB373; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0261CCEEDF Received-SPF: Fail (: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=alison.wang@freescale.com; X-OriginatorOrg: freescale.com Cc: fabio.estevam@freescale.com Subject: [U-Boot] [PATCH v2 07/10] driver/ddr/freescale: Fix DDR3 driver for ARM X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: York Sun Reading DDR register should use ddr_in32() for proper endianess. This patch fixes incorrect waiting time for ARM platforms. Signed-off-by: York Sun --- Change log: v2: no change. drivers/ddr/fsl/arm_ddr_gen3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c index d4ed9ae..59f2fd6 100644 --- a/drivers/ddr/fsl/arm_ddr_gen3.c +++ b/drivers/ddr/fsl/arm_ddr_gen3.c @@ -194,7 +194,7 @@ step2: * For example, 2GB on 666MT/s 64-bit bus takes about 402ms * Let's wait for 800ms */ - bus_width = 3 - ((ddr->sdram_cfg & SDRAM_CFG_DBW_MASK) + bus_width = 3 - ((ddr_in32(&ddr->sdram_cfg) & SDRAM_CFG_DBW_MASK) >> SDRAM_CFG_DBW_SHIFT); timeout = ((total_gb_size_per_controller << (6 - bus_width)) * 100 / (get_ddr_freq(0) >> 20)) << 1;