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>
This commit is contained in:
parent
9f8fdfc2df
commit
6b36dd644c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue