[PATCH 2 2/3] mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips
Wolfram Sang
w.sang at pengutronix.de
Tue Oct 26 06:25:48 EDT 2010
On Tue, Oct 26, 2010 at 11:26:31AM +0200, Guillaume LECERF wrote:
> Add support for SST38VF640x chips in CFI mode.
>
> Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
> Signed-off-by: yidong zhang <zhangyd6 at gmail.com>
> ---
> drivers/mtd/chips/cfi_cmdset_0002.c | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 1934476..1cdba02 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -293,6 +293,21 @@ static void fixup_sst39vf_rev_b(struct mtd_info *mtd, void *param)
> cfi->addr_unlock2 = 0x2AA;
> }
>
> +static void fixup_sst38vf640x_sectorsize(struct mtd_info *mtd, void *param)
> +{
> + struct map_info *map = mtd->priv;
> + struct cfi_private *cfi = map->fldrv_priv;
> +
> + fixup_sst39vf_rev_b(mtd, param);
> +
> + /*
> + * CFI reports 1024 sectors (0x03ff +1) of 64KBytes (0x0100 *256) where
> + * it should report a size of 8KBytes (0x0020 *256).
Spaces after operators?
> + */
> + cfi->cfiq->EraseRegionInfo[0] = 0x002003ff;
> + pr_warning("%s: Bad 38VF640x CFI data, adjust sector size from 64 to 8KBytes\n", mtd->name);
Should be "adjusting", otherwise it sounds like a task for the user to do.
Regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101026/23a88365/attachment.sig>
More information about the linux-mtd
mailing list