Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41248 )
Change subject: soc/amd/common/block/spi: Add support for common SPI configuration ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41248/4/src/soc/amd/common/block/sp... File src/soc/amd/common/block/spi/fch_spi.c:
https://review.coreboot.org/c/coreboot/+/41248/4/src/soc/amd/common/block/sp... PS4, Line 69: fch_spi_config_modes
Does all this logic belong in fch_spi_ctrl. […]
fch_spi_ctrl.c is basically exposing a SPI flash controller for use by coreboot and implementing the generic functions expected from the flash controller to talk to the SPI flash - spi_init, spi_xfer, etc. This file is meant for any SPI configuration. I modeled it mostly around how other x86 SoC drivers are currently written.