[PATCH v5 3/5] mtd: nand: Enable subpage-reads on flashes with on-die ECC enabled.

Gerhard Sittig gsi at denx.de
Wed Apr 16 12:23:15 PDT 2014


On Mon, 2014-04-14 at 13:35 -0600, David Mosberger wrote:
> 
> The Micron chips supported through the on-die ECC all have subpage capability,
> so enable that.
> 
> [ ... ]
> @@ -4144,8 +4191,13 @@ int nand_scan_tail(struct mtd_info *mtd)
>  	/* Invalidate the pagebuffer reference */
>  	chip->pagebuf = -1;
>  
> -	/* Large page NAND with SOFT_ECC should support subpage reads */
> -	if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
> +	/*
> +	 * Large page NAND with SOFT_ECC or on-die ECC should support
> +	 * subpage reads.
> +	 */
> +	if (((ecc->mode == NAND_ECC_SOFT)
> +	     || (chip->ecc.mode == NAND_ECC_HW_ON_DIE))
> +	    && (chip->page_shift > 9))
>  		chip->options |= NAND_SUBPAGE_READ;
>  
>  	/* Fill in remaining MTD driver data */

the commit message suggests that it's an assumption for current
Micron chips, the code implements an unconditional subpage
enabling for any chip that happens to have on-die-ECC -- is there
some ID data that more reliably reflects whether support for
subpages exists?


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de



More information about the linux-mtd mailing list