Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63937 )
Change subject: soc/amd/common/block/spi: Print error when SPI bus can't be acquired ......................................................................
soc/amd/common/block/spi: Print error when SPI bus can't be acquired
Silently failing makes it hard to debug when something goes wrong.
BUG=b:228289365 TEST=build guybrush
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: I7423a7011e7656414155386c014a9a0f2fad4abf Reviewed-on: https://review.coreboot.org/c/coreboot/+/63937 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Fred Reitberger reitbergerfred@gmail.com Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/common/block/spi/fch_spi_ctrl.c 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved Fred Reitberger: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/common/block/spi/fch_spi_ctrl.c b/src/soc/amd/common/block/spi/fch_spi_ctrl.c index b2fe13d..e8f20f3 100644 --- a/src/soc/amd/common/block/spi/fch_spi_ctrl.c +++ b/src/soc/amd/common/block/spi/fch_spi_ctrl.c @@ -139,8 +139,10 @@ return -1; }
- if (wait_for_ready()) + if (wait_for_ready()) { + printk(BIOS_ERR, "FCH SPI: Failed to acquire the SPI bus\n"); return -1; + }
spi_write8(SPI_CMD_CODE, cmd); spi_write8(SPI_TX_BYTE_COUNT, bytesout);