MTD: Add fixup for S29NS512P NOR flash.
Artem Bityutskiy
dedekind1 at gmail.com
Sat May 12 10:01:53 EDT 2012
On Fri, 2012-05-11 at 12:15 +0200, Javier Martin wrote:
> Spansion S29NS512P flash uses a 16bit transfer to report number
> of sectors instead of two 8bit accesses as CFI specifies.
>
> Signed-off-by: Javier Martin <javier.martin at vista-silicon.com>
> ---
> drivers/mtd/chips/cfi_cmdset_0002.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 23175ed..5873b1f 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -332,6 +332,19 @@ static void fixup_s29gl032n_sectors(struct mtd_info *mtd)
> }
> }
>
> +static void fixup_s29ns512p_sectors(struct mtd_info *mtd)
> +{
> + struct map_info *map = mtd->priv;
> + struct cfi_private *cfi = map->fldrv_priv;
> +
> + /*
> + * S29NS512P flash uses more than 8bits to report number of sectors,
> + * which is not permitted by CFI.
> + */
> + cfi->cfiq->EraseRegionInfo[0] = 0x020001ff;
> + pr_warning("%s: Bad S29NS512P CFI data, adjust to 512 sectors\n", mtd->name);
What is the purpose of printing this warning - how the user should act
upon it? If you successfully work-around a known HW issue, you should
not warn. HW workarounds are normal.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120512/18959cae/attachment.sig>
More information about the linux-mtd
mailing list