[PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

Gupta, Pekon pekon at ti.com
Tue Apr 30 06:04:25 EDT 2013


> -	*busw = 0;
> -	if (le16_to_cpu(p->features) & 1)
> -		*busw = NAND_BUSWIDTH_16;
> +
> +	*busw = (onfi_feature(chip) & ONFI_FEATURE_16_BIT_BUS) ?
> +			NAND_BUSWIDTH_16 : 0;

Is this really needed ? you have already checked the 'onfi_version' above in
nand_flash_detect_onfi() ..
	if (!chip->onfi_version) {
		pr_info("%s: unsupported ONFI version: %d\n", __func__, val);
		return 0;
	}

with regards, pekon



More information about the linux-mtd mailing list