From 6b36dd644c6a2cbc75d487afc7dd56322bb7ec96 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Thu, 28 Apr 2022 16:13:41 -0600 Subject: 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 Change-Id: I7423a7011e7656414155386c014a9a0f2fad4abf Reviewed-on: https://review.coreboot.org/c/coreboot/+/63937 Tested-by: build bot (Jenkins) Reviewed-by: Fred Reitberger Reviewed-by: Felix Held --- src/soc/amd/common/block/spi/fch_spi_ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 b2fe13d107..e8f20f3bc6 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 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, 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); -- cgit v1.2.3