Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41750 )
Change subject: spi/macronix: Add support for boot media protection ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41750/5/src/drivers/spi/macronix.c File src/drivers/spi/macronix.c:
https://review.coreboot.org/c/coreboot/+/41750/5/src/drivers/spi/macronix.c@... PS5, Line 335: macronix_set_write_protection(const struct spi_flash *flash,
what Winbond calls the CMP bit is essentially just the highest BP bit in Macronix-lingo […]
Thanks for all the work, this is some good stuff! Sorry for the late review.
I still hope we can get that BP3-is-CMP idea to work and slim the effective differences down a bit further, though. See my comments in CB:42124, I think this should be possible, the only difference really is that for "CMP mode" Winbond starts counting blocks from 0 up and Macronix is counting them from the top down.
Also, just for reviewing ease I think it would be nicer if you could put the patches for moving the Winbond calculations to common first, and then put the patch for adding Macronix at the end (so there's not so much code being added and removed right away again, and it's easier to see what Macronix needs to add to the existing algorithm).