From patchwork Fri Jan 4 18:14:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,3/7] Fix data stage name matching issue Date: Fri, 04 Jan 2013 08:14:01 -0000 From: York Sun X-Patchwork-Id: 209515 Message-Id: <1357323245-12455-3-git-send-email-yorksun@freescale.com> To: Cc: James Yang , afleming@freescale.com 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;