[U-Boot] [U-Boot, 2/5] mtd: atmel_nand: enable PMECC support for 8k bytes page NAND flash

Scott Wood scottwood at freescale.com
Thu Nov 14 02:15:53 CET 2013


On Fri, Oct 18, 2013 at 05:46:31PM +0800, Wu, Josh wrote:
> @@ -840,6 +841,13 @@ static int atmel_pmecc_nand_init_params(struct nand_chip *nand,
>  		nand->ecc.steps = 1;
>  		nand->ecc.bytes = host->pmecc_bytes_per_sector *
>  				       host->pmecc_sector_number;
> +
> +		if (nand->ecc.bytes > MTD_MAX_ECCPOS_ENTRIES_LARGE) {
> +			dev_err(host->dev, "too large eccpos entries. max support ecc.bytes is %d\n",
> +					MTD_MAX_ECCPOS_ENTRIES_LARGE);
> +			return -EINVAL;
> +		}

I won't hold up acceptance over this, but wouldn't it be more useful to
show the actual ecc.bytes rather than the constant limit which could be
easily looked up in the source?  Or better, print both.

-Scott



More information about the U-Boot mailing list