[PATCH 2/4] mtd: cfi_cmdset_0002: make sector erase command variable

Wolfram Sang w.sang at pengutronix.de
Sat Oct 23 06:24:49 EDT 2010


On Fri, Oct 22, 2010 at 05:40:20PM +0200, Guillaume LECERF wrote:
> Some old SST chips use 0x50 as sector erase command, instead
> of 0x30. Make this value variable to handle such chips.
> 
> Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
> ---
>  drivers/mtd/chips/cfi_cmdset_0002.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 3e6c47b..209928b 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -78,6 +78,7 @@ static struct mtd_chip_driver cfi_amdstd_chipdrv = {
>  	.module		= THIS_MODULE
>  };
>  
> +static map_word sector_erase_cmd = CMD(0x30);

Uh? A static one? Why not per device?

I'd also suggest to fold the next patch into this one, so the need for the
change is more obvious.

-- 
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/20101023/8e441ac6/attachment.sig>


More information about the linux-mtd mailing list