Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/45748 )
Change subject: spi25: Add 'spi_read_status_register_2()' helper ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/flashrom/+/45748/3/spi25_statusreg.c File spi25_statusreg.c:
https://review.coreboot.org/c/flashrom/+/45748/3/spi25_statusreg.c@118 PS3, Line 118: return spi_read_status_register_generic(flash, 0x35); /* Unclear if this is a std JEDEC opcode. */
Looks like not, as other vendors use it to enter QPI: […]
That is some decent research thanks! Tricky ok.. I had a think and I have great proposals so open to suggestions? I agree the current function is less than ideal giving the situation as it could mislead a caller into perhaps something they never intended and it would be hard to debug.
We could call it 'spi_read_msr()` and just document in the header that this is intended as a sort of RDSR2 op on Winbond, SST, Adesto and Zbit however Cypress*, ISSI, Macronix and others could be exceptions.