From patchwork Mon Jun 27 20:30:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 102271 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 47D12B6F68 for ; Tue, 28 Jun 2011 06:31:27 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E9F82280AE; Mon, 27 Jun 2011 22:31:23 +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 eF1fJ6emTonh; Mon, 27 Jun 2011 22:31:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 062E5280B8; Mon, 27 Jun 2011 22:31:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58440280B8 for ; Mon, 27 Jun 2011 22:31:19 +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 CU8x10-FYPvV for ; Mon, 27 Jun 2011 22:31:18 +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 CH1EHSOBE004.bigfish.com (ch1ehsobe001.messaging.microsoft.com [216.32.181.181]) by theia.denx.de (Postfix) with ESMTPS id BA212280AE for ; Mon, 27 Jun 2011 22:31:15 +0200 (CEST) Received: from mail38-ch1-R.bigfish.com (216.32.181.169) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.22; Mon, 27 Jun 2011 20:31:11 +0000 Received: from mail38-ch1 (localhost.localdomain [127.0.0.1]) by mail38-ch1-R.bigfish.com (Postfix) with ESMTP id 9DD6DA28108 for ; Mon, 27 Jun 2011 20:31:11 +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 mail38-ch1 (localhost.localdomain [127.0.0.1]) by mail38-ch1 (MessageSwitch) id 1309206671451107_25585; Mon, 27 Jun 2011 20:31:11 +0000 (UTC) Received: from CH1EHSMHS032.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.253]) by mail38-ch1.bigfish.com (Postfix) with ESMTP id 6B17EFF004B for ; Mon, 27 Jun 2011 20:31:11 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS032.bigfish.com (10.43.70.32) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 27 Jun 2011 20:31: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.289.8; Mon, 27 Jun 2011 15:30:57 -0500 Received: from localhost.localdomain (mvp-10-214-72-23.am.freescale.net [10.214.72.23]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p5RKUuni008060; Mon, 27 Jun 2011 15:30:56 -0500 (CDT) From: York Sun To: Date: Mon, 27 Jun 2011 13:30:55 -0700 Message-ID: <1309206655-27725-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] powerpc/mpc85xx: Display a warning for unsupported DDR data rates 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 If DDR initialziation uses a speed table and the speed is not matched, print a warning message instead of silently ignoring. Signed-off-by: York Sun --- board/freescale/corenet_ds/ddr.c | 6 ++++++ board/freescale/mpc8572ds/ddr.c | 8 ++++---- board/freescale/mpc8641hpcn/ddr.c | 5 +++++ board/freescale/p2020ds/ddr.c | 6 ++++++ board/xes/xpedite550x/ddr.c | 6 ++++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c index f2b716d..a184592 100644 --- a/board/freescale/corenet_ds/ddr.c +++ b/board/freescale/corenet_ds/ddr.c @@ -192,10 +192,16 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->clk_adjust = pbsp->clk_adjust; popts->wrlvl_start = pbsp->wrlvl_start; popts->twoT_en = pbsp->force_2T; + break; } pbsp++; } + if (i == num_params) { + printf("Warning: board specific timing not found " + "for data rate %lu MT/s!\n", ddr_freq); + } + /* * Factors to consider for half-strength driver enable: * - number of DIMMs installed diff --git a/board/freescale/mpc8572ds/ddr.c b/board/freescale/mpc8572ds/ddr.c index ab471af..adcbd58 100644 --- a/board/freescale/mpc8572ds/ddr.c +++ b/board/freescale/mpc8572ds/ddr.c @@ -104,7 +104,6 @@ void fsl_ddr_board_options(memctl_options_t *popts, u32 num_params; u32 i; ulong ddr_freq; - int matched = 0; if (!pdimm->n_ranks) return; @@ -151,14 +150,15 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->cpo_override = pbsp->cpo; popts->write_data_delay = pbsp->write_data_delay; popts->twoT_en = pbsp->force_2T; - matched = 1; break; } pbsp++; } - if (!matched) - printf("Warning: board specific timing not found!\n"); + if (i == num_params) { + printf("Warning: board specific timing not found " + "for data rate %lu MT/s!\n", ddr_freq); + } /* * Factors to consider for half-strength driver enable: diff --git a/board/freescale/mpc8641hpcn/ddr.c b/board/freescale/mpc8641hpcn/ddr.c index bd0b299..4f2e853 100644 --- a/board/freescale/mpc8641hpcn/ddr.c +++ b/board/freescale/mpc8641hpcn/ddr.c @@ -127,6 +127,11 @@ void fsl_ddr_board_options(memctl_options_t *popts, } } + if (i == num_params) { + printf("Warning: board specific timing not found " + "for data rate %lu MT/s!\n", ddr_freq); + } + /* 2T timing enable */ popts->twoT_en = 1; } diff --git a/board/freescale/p2020ds/ddr.c b/board/freescale/p2020ds/ddr.c index 9bf7d2f..926fd19 100644 --- a/board/freescale/p2020ds/ddr.c +++ b/board/freescale/p2020ds/ddr.c @@ -83,10 +83,16 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->cpo_override = pbsp->cpo; popts->write_data_delay = pbsp->write_data_delay; popts->twoT_en = pbsp->force_2T; + break; } pbsp++; } + if (i == num_params) { + printf("Warning: board specific timing not found " + "for data rate %lu MT/s!\n", ddr_freq); + } + /* * Factors to consider for half-strength driver enable: * - number of DIMMs installed diff --git a/board/xes/xpedite550x/ddr.c b/board/xes/xpedite550x/ddr.c index 3b6e08b..8031a34 100644 --- a/board/xes/xpedite550x/ddr.c +++ b/board/xes/xpedite550x/ddr.c @@ -125,10 +125,16 @@ void fsl_ddr_board_options(memctl_options_t *popts, popts->clk_adjust = pbsp->clk_adjust; popts->cpo_override = pbsp->cpo; popts->twoT_en = 0; + break; } pbsp++; } + if (i == num_params) { + printf("Warning: board specific timing not found " + "for data rate %lu MT/s!\n", ddr_freq); + } + /* * Factors to consider for half-strength driver enable: * - number of DIMMs installed