summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2022-04-28 16:13:41 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-05-02 14:03:38 +0000
commit6b36dd644c6a2cbc75d487afc7dd56322bb7ec96 (patch)
tree13a219fd936968fc2ae6fc2c08f7c2a8fc489878 /src
parent9f8fdfc2dff34c2ad1c1aeba506221fe659419cc (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/common/block/spi/fch_spi_ctrl.c4
1 files changed, 3 insertions, 1 deletions
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);