Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37957 )
Change subject: soc/amd/common/block/spi: remove code duplication ......................................................................
Patch Set 4:
(1 comment)
LGTM. I can test it on Mandolin or Grunt in a few days, unless you did that already.
https://review.coreboot.org/c/coreboot/+/37957/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37957/4//COMMIT_MSG@13 PS4, Line 13: We can add this later. I don't yet see what's missing here. If I'm reading it correctly, struct spi_ctrlr's *flash_protect is intended to only program region protect registers in the controller/bridge if they exist. However struct spi_flash_ops's *set_write_protection is for the device itself (e.g. how to behave when WP# is asserted). That said, I only see set_write_protection() implemented in winbond, and I'd bet all the various devices' regions probably don't coincide well with the controllers' capabilities.