[flashrom] [PATCH] Macronix MX25L6445E
stefan.tauner at student.tuwien.ac.at
Fri Jun 17 15:48:49 CEST 2011
On Mon, 30 May 2011 14:08:09 +0200
"Wagner, Helge (GE Intelligent Platforms)" <Helge.Wagner at ge.com> wrote:
> i have tried to reprogram a Macronix MX25L6445E flash chip. This worked, but gave me an error message:
> ERASE FAILED at 0x0001107f! Expected=0xff, Read=0x00, failed byte count from 0x00010000-0x0001ffff: 0x9c15
> ERASE FAILED!
> Looking deeper into the datasheet, i saw that the MX25L6445E has the same ID as the MX25L6405, but with (at least) one difference:
> The MX25L6405 has a block size of 64KByte for erase function 20h, while the MX25L6445E is using 4KByte sector size for the same erase function 20h. As a result the spi_block_erase_20() will fail for the MX25L6445E (while the spi_block_erase_d8() which is used then will succeed).
> I have now re-ordered the erase functions for the MX25L6405/MX25L6445E:
> spi_block_erase_d8 - first
> spi_block_erase_60 - second
> spi_block_erase_c7 - third
> spi_block_erase_20 - last
> So if one of the d8/60/c7 erase functions are successfull, the spi_block_erase_20 will never be called.
> To be sure that the spi_block_erase_20 works for both the MX25L6405 and the MX25L6445E, we could change the block erase size from 64K to 4K. This should work even for the MX25L6405, but with the side effect of the erase taking longer than needed.
> Any comments?
> Please find my patches included.
> Signed-off-by: Helge Wagner <Helge.Wagner at ge.com>
thanks for your patch!
i have not looked at the datasheet(s), but maybe there is a way to
distinguish the two devices (with another id command for example)?
if we change the order of eraser functions as your patch suggests we
should comment the reason precisely in the code. else we may introduce
the previous behavior sometime later e.g. when we refine partial writes.
i personally don't see a problem apart from that, but i am not sure if
it is safe either and wont break pending patches. so others have to ack
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom