[U-Boot] [PATCH 1/1] ppc4xx: add support for alternate format for ndfc

Wolfgang Denk wd at denx.de
Fri Feb 19 00:13:07 CET 2010


Dear fkan at amcc.com,

In message <1266531913-20756-1-git-send-email-fkan at amcc.com> you wrote:
> From: Feng Kan <fkan at amcc.com>
> 
> This is to lock down the ordering in the correction routine against
> the calculate routine. Otherwise, incorrect define would cause ECC errors.
> 
> Signed-off-by: Feng Kan <fkan at amcc.com>
> Acked-by: Victor Gallardo <vgallardo at amcc.com>
> ---
>  drivers/mtd/nand/ndfc.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
> index 0dd6789..88e341d 100644
> --- a/drivers/mtd/nand/ndfc.c
> +++ b/drivers/mtd/nand/ndfc.c
> @@ -89,9 +89,15 @@ static int ndfc_calculate_ecc(struct mtd_info *mtdinfo,
>  
>  	/* The NDFC uses Smart Media (SMC) bytes order
>  	 */
> +#ifdef CONFIG_MTD_NAND_ECC_SMC
>  	ecc_code[0] = p[1];
>  	ecc_code[1] = p[2];
>  	ecc_code[2] = p[3];
> +#else
> +	ecc_code[0] = p[2];
> +	ecc_code[1] = p[1];
> +	ecc_code[2] = p[3];
> +#endif

This patch seems wrong to me as CONFIG_MTD_NAND_ECC_SMC is nowhere
defined.  [Also, it's not documented anywhere.]

If this is fixing a bug, then please describe the exact problem, how
to reproduce it, and how this patch is supposed to fix this problem.

As is, this makes no sense to me.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Don't panic.


More information about the U-Boot mailing list