Use REMS instead of RES in the ICH SPI default opcode table.
RES is Read Electronic Signature (1 Byte, identical for different chips) REMS is Read Electronic Manufacturer Signature (2 Bytes, unique)
Of the chips which don't support RDID, a sizable portion supports REMS which gives us both a manufacturer ID and a device ID. This is clearly superior to having only a device ID (the RES case) which has multiple documented collisions.
The best way forward would be to have the ICH SPI driver reprogram the opcode menu on the fly if the opcode menu doesn't contain the requested opcode and the opcode menu is not locked. Until that happens, this patch improves detection accuracy by a factor of 256 for some chips.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-ichspi_res_rems_exchange/ichspi.c =================================================================== --- flashrom-ichspi_res_rems_exchange/ichspi.c (Revision 515) +++ flashrom-ichspi_res_rems_exchange/ichspi.c (Arbeitskopie) @@ -186,7 +186,7 @@ {JEDEC_READ, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Read Data {JEDEC_BE_D8, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 1}, // Erase Sector {JEDEC_RDSR, SPI_OPCODE_TYPE_READ_NO_ADDRESS, 0}, // Read Device Status Reg - {JEDEC_RES, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Resume Deep Power-Down + {JEDEC_REMS, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Read Electronic Manufacturer Signature {JEDEC_WRSR, SPI_OPCODE_TYPE_WRITE_NO_ADDRESS, 1}, // Write Status Register {JEDEC_RDID, SPI_OPCODE_TYPE_READ_NO_ADDRESS, 0}, // Read JDEC ID {JEDEC_CE_C7, SPI_OPCODE_TYPE_WRITE_NO_ADDRESS, 1}, // Bulk erase
On 16.05.2009 01:30, Carl-Daniel Hailfinger wrote:
Use REMS instead of RES in the ICH SPI default opcode table.
RES is Read Electronic Signature (1 Byte, identical for different chips) REMS is Read Electronic Manufacturer Signature (2 Bytes, unique)
Of the chips which don't support RDID, a sizable portion supports REMS which gives us both a manufacturer ID and a device ID. This is clearly superior to having only a device ID (the RES case) which has multiple documented collisions.
The best way forward would be to have the ICH SPI driver reprogram the opcode menu on the fly if the opcode menu doesn't contain the requested opcode and the opcode menu is not locked. Until that happens, this patch improves detection accuracy by a factor of 256 for some chips.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Ping?
Regards, Carl-Daniel
It looks fine to me but I have no way to test. Is this tested anywhere?
ron
Uwe: Maybe you want to look at this and ack it?
On 26.05.2009 03:56, ron minnich wrote:
It looks fine to me but I have no way to test. Is this tested anywhere?
Yes, Uwe tested it with the following result: Found chip "SST SST25VF040.REMS"
Regards, Carl-Daniel
Acked-by: Ronald G. Minnich rminnich@gmail.com
On 26.05.2009 05:09, ron minnich wrote:
Acked-by: Ronald G. Minnich rminnich@gmail.com
Thanks, committed in r549.
Regards, Carl-Daniel