Attention is currently required from: Simon Buhrow, Thomas Heijligen, Aarya.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67354 )
Change subject: spi.c: Add erasefn and opcodes for AT45 and S25F ......................................................................
Patch Set 2:
(1 comment)
File spi.c:
https://review.coreboot.org/c/flashrom/+/67354/comment/459b7416_bd0586ef PS2, Line 50: &spi_erase_at45cs_sector, 0x50},
Nico, please have a look here at45db.c:417 spi_erase_at45cs_sector(). […]
That is quite annoying. The logical thing to do would be to return both at once, and then call probe_opcode() for each of them. Either as array (0-terminated would be easiest) or multiple opcodes encoded into one integer, e.g.
{&spi_erase_at45cs_sector, 0x7c << 8 | 0x50},
What makes it even more annoying is that we would have to adapt the spi_get_erasefn_from_opcode() function too, if it should keep using the same list (even though we know it won't be called for AT45 chips).
Not sure what is the best way to go forward.