From patchwork Thu Dec 9 02:55:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 74833 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 8967DB70D6 for ; Thu, 9 Dec 2010 13:56:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2F0F28191; Thu, 9 Dec 2010 03:55:58 +0100 (CET) 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 vIiYR4Z8GJi7; Thu, 9 Dec 2010 03:55:58 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BCC592817A; Thu, 9 Dec 2010 03:55:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE8AF2817A for ; Thu, 9 Dec 2010 03:55:52 +0100 (CET) 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 hJ2eaWJUWv+y for ; Thu, 9 Dec 2010 03:55:49 +0100 (CET) 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 TX2EHSOBE001.bigfish.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by theia.denx.de (Postfix) with ESMTPS id 1665B28178 for ; Thu, 9 Dec 2010 03:55:47 +0100 (CET) Received: from mail56-tx2-R.bigfish.com (10.9.14.244) by TX2EHSOBE001.bigfish.com (10.9.40.21) with Microsoft SMTP Server id 14.1.225.8; Thu, 9 Dec 2010 02:55:45 +0000 Received: from mail56-tx2 (localhost.localdomain [127.0.0.1]) by mail56-tx2-R.bigfish.com (Postfix) with ESMTP id C7AACF40277 for ; Thu, 9 Dec 2010 02:55:45 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:de01egw02.freescale.net; RD:de01egw02.freescale.net; EFVD:NLI Received: from mail56-tx2 (localhost.localdomain [127.0.0.1]) by mail56-tx2 (MessageSwitch) id 1291863345657217_25627; Thu, 9 Dec 2010 02:55:45 +0000 (UTC) Received: from TX2EHSMHS049.bigfish.com (unknown [10.9.14.245]) by mail56-tx2.bigfish.com (Postfix) with ESMTP id 93D2819E0058 for ; Thu, 9 Dec 2010 02:55:45 +0000 (UTC) Received: from de01egw02.freescale.net (192.88.165.103) by TX2EHSMHS049.bigfish.com (10.9.99.149) with Microsoft SMTP Server (TLS) id 14.1.225.8; Thu, 9 Dec 2010 02:55:45 +0000 Received: from az33smr02.freescale.net (az33smr02.freescale.net [10.64.34.200]) by de01egw02.freescale.net (8.14.3/8.14.3) with ESMTP id oB92thSF001138 for ; Wed, 8 Dec 2010 19:55:44 -0700 (MST) Received: from localhost.localdomain (mvp-10-214-72-131.am.freescale.net [10.214.72.131]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id oB92tg6e025877; Wed, 8 Dec 2010 20:55:42 -0600 (CST) From: York Sun To: Date: Wed, 8 Dec 2010 18:55:31 -0800 Message-ID: <1291863340-4354-1-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Subject: [U-Boot] [PATCH 01/10] Display RDIMM if detected 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 Print a message when a RDIMM is detected. Signed-off-by: York Sun --- .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c | 19 +++++++------------ 1 files changed, 7 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c index 029e566..af0250d 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c @@ -98,7 +98,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params, unsigned int tDQSQ_max_ps = 0; unsigned int tQHS_ps = 0; - unsigned int temp1, temp2, temp3; + unsigned int temp1, temp2; unsigned int additive_latency = 0; #if !defined(CONFIG_FSL_DDR3) const unsigned int mclk_ps = get_memory_clk_period_ps(); @@ -215,21 +215,16 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params, } outpdimm->all_DIMMs_registered = 0; + outpdimm->all_DIMMs_unbuffered = 0; if (temp1 && !temp2) { outpdimm->all_DIMMs_registered = 1; - } - - outpdimm->all_DIMMs_unbuffered = 0; - if (!temp1 && temp2) { + printf("Detected RDIMM(s)\n"); + } else if (!temp1 && temp2) { outpdimm->all_DIMMs_unbuffered = 1; - } - - /* CHECKME: */ - if (!outpdimm->all_DIMMs_registered - && !outpdimm->all_DIMMs_unbuffered) { + printf("Detected UDIMM(s)\n"); + } else printf("ERROR: Mix of registered buffered and unbuffered " "DIMMs detected!\n"); - } temp1 = 0; if (outpdimm->all_DIMMs_registered) @@ -237,7 +232,7 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params, outpdimm->rcw[j] = dimm_params[0].rcw[j]; for (i = 1; i < number_of_dimms; i++) if (dimm_params[i].rcw[j] != dimm_params[0].rcw[j]) { - temp3 = 1; + temp1 = 1; break; } }