[PATCH RFC 1/2] mtd: cfi_cmdset_0002: Micron M29EW bugfix "Correcting Erase Suspend Hang Ups"
Artem Bityutskiy
dedekind1 at gmail.com
Wed Jun 27 06:27:35 EDT 2012
On Mon, 2012-06-18 at 09:24 +0200, Gerlando Falauto wrote:
> + /* before resume, insert a dummy 0xF0 cycle for Micron M29EW devices */
> + if ( (cfi->mfr == 0x0089) &&
> + (((cfi->device_type == CFI_DEVICETYPE_X8) && ((cfi->id & 0xff)== 0x7e))
> + || ((cfi->device_type == CFI_DEVICETYPE_X16) && (cfi->id == 0x227e))) )
> + map_write(map, CMD(0xF0), chip->in_progress_block_addr);
Please, separate the M29-specific quirks out to functions, do not inject
them to the main code.
Each quirk should be in a separate function, e.g.
'micron_m29_erase_quirk()'. The functions should have a descriptive
comment similar to what you added to the commit message. The function
just returns if the chip ID is not M29. This will be cleaner.
--
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/20120627/1a21fb52/attachment-0001.sig>
More information about the linux-mtd
mailing list