Thanks for the update. It seems nearly ready.
I've looked closer at this "family code" and am sure that
it is usually handled as part of what flashrom calls the
model id.
8 comments:
#define ST_SPI_FAMILY_CODE 0x00
#define ST_M95M02 0x0012 /* ST M95XXX 2Mbit (256KiB) */
Please use tabs for alignment.
The high byte 00 here is actually the family code. I don't
think we need a separate definition for that. The "model id"
for ST_M95M02 should simply include it.
Patch Set #1, Line 14121: .eraseblocks = { { 256 * 1024, 1 } },
Done
I guess, I really meant `{ 256, 1024 }`. The `.count` is handled in
walk_eraseblocks(). I don't care much, as running flashrom with -E
for an EEPROM is rather theoretical anyway.
Patch Set #2, Line 443: static int spi_nbyte_program(struct flashctx *flash, unsigned int addr, const uint8_t *bytes, unsigned int len)
Moving this function doesn't seem needed anymore?
Patch Set #2, Line 8: * the Free Software Foundation; version 2 of the License.
I would prefer new code to be added under
"either version 2 of the License, or
(at your option) any later version."
It's your call. I just want to make sure, you are aware that not all
of flashrom agrees to the v2-only choice.
Patch Set #2, Line 34: uint32_t id1, id2, id3;
As mentioned in `flashchips.h`, the model id (id2) should include the
family code. So this should be:
uint8_t id1;
uint16_t id2;
id2 = readarr[2]; // model id
id3 = readarr[1]; // SPI Family code, must be 0x00
Please join these into a single `id2` that is compared against `chip->model_id`.
Patch Set #2, Line 61: (uint8_t*) malloc
Please place space as follows:
(uint8_t *)malloc
To view, visit change 34496. To unsubscribe, or for help writing mail filters, visit settings.