From patchwork Thu May 26 23:25:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 97640 X-Patchwork-Delegate: galak@kernel.crashing.org 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 22BC4B6F8B for ; Fri, 27 May 2011 09:26:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84A9D28191; Fri, 27 May 2011 01:26:40 +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 6Xc0iF88MKoC; Fri, 27 May 2011 01:26:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEBCB2813F; Fri, 27 May 2011 01:26:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 74D4E28176 for ; Fri, 27 May 2011 01:26:28 +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 O1TR2g+3XMSS for ; Fri, 27 May 2011 01:26:25 +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 AM1EHSOBE002.bigfish.com (am1ehsobe002.messaging.microsoft.com [213.199.154.205]) by theia.denx.de (Postfix) with ESMTPS id AAE662813F for ; Fri, 27 May 2011 01:26:14 +0200 (CEST) Received: from mail59-am1-R.bigfish.com (10.3.201.246) by AM1EHSOBE002.bigfish.com (10.3.204.22) with Microsoft SMTP Server id 14.1.225.22; Thu, 26 May 2011 23:26:13 +0000 Received: from mail59-am1 (localhost.localdomain [127.0.0.1]) by mail59-am1-R.bigfish.com (Postfix) with ESMTP id DFF4F15A808D for ; Thu, 26 May 2011 23:26:13 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail59-am1 (localhost.localdomain [127.0.0.1]) by mail59-am1 (MessageSwitch) id 1306452373632535_26911; Thu, 26 May 2011 23:26:13 +0000 (UTC) Received: from AM1EHSMHS012.bigfish.com (unknown [10.3.201.243]) by mail59-am1.bigfish.com (Postfix) with ESMTP id 943001B0804E for ; Thu, 26 May 2011 23:26:13 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS012.bigfish.com (10.3.207.112) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 26 May 2011 23:26:09 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.270.2; Thu, 26 May 2011 18:26:07 -0500 Received: from localhost.localdomain (vpn-10-214-200-8.ap.freescale.net [10.214.200.8]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p4QNPv9r000699; Thu, 26 May 2011 18:26:06 -0500 (CDT) From: York Sun To: Date: Fri, 27 May 2011 07:25:52 +0800 Message-ID: <1306452353-11611-6-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1306452353-11611-1-git-send-email-yorksun@freescale.com> References: <1306452353-11611-1-git-send-email-yorksun@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [U-Boot] [PATCH 6/7] powerpc/mpc8xxx: Adding fallback to raw timing on supported boards X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 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 In case of empty SPD or checksum error, fallback to raw timing on supported boards. Signed-off-by: York Sun --- arch/powerpc/cpu/mpc8xxx/ddr/main.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c index db7cf11..2e43da6 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c @@ -343,12 +343,20 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step, &(pinfo->dimm_params[i][j]); retval = compute_dimm_parameters(spd, pdimm, i); +#ifdef CONFIG_DDR_RAW_TIMING + if (retval != 0) { + printf("SPD error! Trying fallback to " + "raw timing calculation\n"); + fsl_ddr_get_dimm_params(pdimm, i, j); + } +#else if (retval == 2) { printf("Error: compute_dimm_parameters" " non-zero returned FATAL value " "for memctl=%u dimm=%u\n", i, j); return 0; } +#endif if (retval) { debug("Warning: compute_dimm_parameters" " non-zero return value for memctl=%u "