[PATCH 3/3 v3] NAND: add support for reading ONFI parameters from NAND device

Matthieu CASTET matthieu.castet at parrot.com
Thu Oct 21 12:52:18 EDT 2010


Hi,

Florian Fainelli a écrit :
> This patch adds support for reading NAND device ONFI parameters and use
> the ONFI informations to define its geometry. In case the device supports
> ONFI, the onfi_version field in struct nand_chip contains the version (BCD)
> and the onfi_params structure can be used by drivers to set up timings and
> such. We currently only support ONFI 1.0 parameters.
> 
> Signed-off-by: Brian Norris <norris at broadcom.com>
> Signed-off-by: Matthieu Castet <matthieu.castet at parrot.com>
> Signed-off-by: Maxime Bizon <mbizon at freebox.fr>
> Signed-off-by: Florian Fainelli <ffainelli at freebox.fr>
> ---
                 chip->cmdfunc = nand_command_lp;
> 
> +       /* TODO onfi flash name */
>         printk(KERN_INFO "NAND device: Manufacturer ID:"
> -              " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, dev_id,
> -              nand_manuf_ids[maf_idx].name, type->name);
> +               " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, *dev_id,
> +               nand_manuf_ids[maf_idx].name,
> +               chip->onfi_version ? type->name:chip->onfi_params.model);
> 
I don't know if it has been noticed but it should be
chip->onfi_version ? chip->onfi_params.model : type->name

Matthieu



More information about the linux-mtd mailing list