From patchwork Thu Jun 26 18:14:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 364635 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 894F91400AB for ; Fri, 27 Jun 2014 04:15:12 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 472FFA773D; Thu, 26 Jun 2014 20:15:09 +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 To13JuYDeDSJ; Thu, 26 Jun 2014 20:15:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25628A773F; Thu, 26 Jun 2014 20:15:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D0F17A773F for ; Thu, 26 Jun 2014 20:15:01 +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 ziBCUcJi0dK5 for ; Thu, 26 Jun 2014 20:14:58 +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-bn1-obe.outbound.protection.outlook.com (dns-bn1lp0143.outbound.protection.outlook.com [207.46.163.143]) by theia.denx.de (Postfix) with ESMTPS id 615AEA773D for ; Thu, 26 Jun 2014 20:14:55 +0200 (CEST) Received: from BN3PR0301CA0059.namprd03.prod.outlook.com (25.160.152.155) by BY2PR03MB158.namprd03.prod.outlook.com (10.242.36.15) with Microsoft SMTP Server (TLS) id 15.0.954.9; Thu, 26 Jun 2014 18:14:50 +0000 Received: from BY2FFO11FD013.protection.gbl (2a01:111:f400:7c0c::103) by BN3PR0301CA0059.outlook.office365.com (2a01:111:e400:401e::27) with Microsoft SMTP Server (TLS) id 15.0.969.15 via Frontend Transport; Thu, 26 Jun 2014 18:14:49 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD013.mail.protection.outlook.com (10.1.14.75) with Microsoft SMTP Server (TLS) id 15.0.969.12 via Frontend Transport; Thu, 26 Jun 2014 18:14:49 +0000 Received: from oslab-l1.am.freescale.net ([10.214.83.187]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s5QIElDf030152; Thu, 26 Jun 2014 11:14:48 -0700 From: York Sun To: Date: Thu, 26 Jun 2014 11:14:44 -0700 Message-ID: <1403806484-13190-1-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199002)(19580395003)(104016002)(95666004)(44976005)(19580405001)(83322001)(6806004)(69596002)(68736004)(33646001)(105606002)(85306003)(21056001)(99396002)(107046002)(4396001)(102836001)(81342001)(2351001)(26826002)(81542001)(81156004)(106466001)(97736001)(50986999)(76482001)(62966002)(85852003)(46102001)(83072002)(48376002)(74502001)(74662001)(88136002)(87936001)(87286001)(84676001)(77156001)(89996001)(20776003)(79102001)(47776003)(64706001)(93916002)(36756003)(50226001)(92566001)(31966008)(80022001)(77982001)(86362001)(92726001)(50466002)(104166001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB158; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BL:0; ACTION:Default; RISK:Low; SCL:0; SPMLVL:NotSpam; PCL:0; RULEID: X-Forefront-PRVS: 02543CD7CD 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=yorksun@freescale.com; X-OriginatorOrg: freescale.com Cc: York Sun Subject: [U-Boot] [PATCH] driver/ddr: Fix DDR register timing_cfg_8 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 The field wrtord_bg should add 2 clocks if on the fly chop is enabled, according to DDR controller manual for DDR4. Signed-off-by: York Sun --- drivers/ddr/fsl/ctrl_regs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c index dcf6287..04e4178 100644 --- a/drivers/ddr/fsl/ctrl_regs.c +++ b/drivers/ddr/fsl/ctrl_regs.c @@ -1857,6 +1857,9 @@ static void set_timing_cfg_8(fsl_ddr_cfg_regs_t *ddr, acttoact_bg = picos_to_mclk(common_dimm->trrdl_ps); wrtord_bg = max(4, picos_to_mclk(7500)); + if (popts->otf_burst_chop_en) + wrtord_bg += 2; + pre_all_rec = 0; ddr->timing_cfg_8 = (0