From patchwork Fri Jan 4 18:14:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 209515 X-Patchwork-Delegate: afleming@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 AA31E2C0086 for ; Sat, 5 Jan 2013 05:30:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A60B4A087; Fri, 4 Jan 2013 19:29:56 +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 e5deW1yFAI7g; Fri, 4 Jan 2013 19:29:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA4DB4A095; Fri, 4 Jan 2013 19:29:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D88CF4A050 for ; Fri, 4 Jan 2013 19:29:37 +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 nDEu5E1sYAY3 for ; Fri, 4 Jan 2013 19:29:37 +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 am1outboundpool.messaging.microsoft.com (am1ehsobe001.messaging.microsoft.com [213.199.154.204]) by theia.denx.de (Postfix) with ESMTPS id 0B0D14A04A for ; Fri, 4 Jan 2013 19:29:35 +0100 (CET) Received: from mail20-am1-R.bigfish.com (10.3.201.236) by AM1EHSOBE014.bigfish.com (10.3.207.136) with Microsoft SMTP Server id 14.1.225.23; Fri, 4 Jan 2013 18:14:26 +0000 Received: from mail20-am1 (localhost [127.0.0.1]) by mail20-am1-R.bigfish.com (Postfix) with ESMTP id D453CA0285 for ; Fri, 4 Jan 2013 18:14:26 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail20-am1 (localhost.localdomain [127.0.0.1]) by mail20-am1 (MessageSwitch) id 1357323265137608_13561; Fri, 4 Jan 2013 18:14:25 +0000 (UTC) Received: from AM1EHSMHS020.bigfish.com (unknown [10.3.201.247]) by mail20-am1.bigfish.com (Postfix) with ESMTP id 1F6B8300067 for ; Fri, 4 Jan 2013 18:14:25 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS020.bigfish.com (10.3.207.158) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 4 Jan 2013 18:14:25 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.318.3; Fri, 4 Jan 2013 18:14:24 +0000 Received: from oslab-l1.am.freescale.net ([10.214.81.109]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r04IEKm9022122; Fri, 4 Jan 2013 11:14:23 -0700 From: York Sun To: Date: Fri, 4 Jan 2013 10:14:01 -0800 Message-ID: <1357323245-12455-3-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1357323245-12455-1-git-send-email-yorksun@freescale.com> References: <1357323245-12455-1-git-send-email-yorksun@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: James Yang , afleming@freescale.com Subject: [U-Boot] [PATCH 3/7] Fix data stage name matching issue 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: James Yang This fix allows the name of the stage to be specifed after the controler and DIMM is specified. Prior to this fix, if the data stage name is not the first entry on the command line, the operation is applied to all controller and DIMMs. Signed-off-by: James Yang --- arch/powerpc/cpu/mpc8xxx/ddr/interactive.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c b/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c index 4d1cf3c..0474acc 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/interactive.c @@ -1390,9 +1390,10 @@ static unsigned int fsl_ddr_parse_interactive_cmd( unsigned int i, j; unsigned int error = 0; - unsigned int matched = 0; for (i = 1; i < argc; i++) { + unsigned int matched = 0; + for (j = 0; j < n_opts; j++) { if (strcmp(options[j].data_name, argv[i]) != 0) continue;