[PATCH v3 4/5] mtd: nand: support Micron READ RETRY

Huang Shijie b32955 at freescale.com
Tue Jan 7 01:54:32 EST 2014


On Fri, Jan 03, 2014 at 04:37:07PM -0800, Brian Norris wrote:
> +static int nand_set_read_retry_micron(struct mtd_info *mtd, int retry_mode)
> +{
> +	struct nand_chip *chip = mtd->priv;
> +	uint8_t feature[ONFI_SUBFEATURE_PARAM_LEN] = {retry_mode};
> +
> +	return chip->onfi_set_features(mtd, chip, ONFI_FEATURE_ADDR_READ_RETRY,
> +			feature);
> +}
> +
> +/*
> + * Configure chip properties from Micron vendor-specific ONFI table
> + */
> +static void nand_onfi_detect_micron(struct nand_chip *chip,
> +		struct nand_onfi_params *p)
> +{
> +	struct nand_onfi_vendor_micron *micron = (void *)p->vendor;
> +
> +	if (le16_to_cpu(p->vendor_revision) < 1)
> +		return;
> +
> +	chip->read_retries = micron->read_retry_options;
> +	chip->set_read_retry = nand_set_read_retry_micron;
Besides the name, i am okay with this patch.

thanks
Huang Shijie




More information about the linux-mtd mailing list