diff options
Diffstat (limited to 'src/soc/amd/common/block/psp')
-rw-r--r-- | src/soc/amd/common/block/psp/psp_smi_flash.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/psp/psp_smi_flash.c b/src/soc/amd/common/block/psp/psp_smi_flash.c index 4c83fcd358..367baef256 100644 --- a/src/soc/amd/common/block/psp/psp_smi_flash.c +++ b/src/soc/amd/common/block/psp/psp_smi_flash.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <amdblocks/spi.h> #include <boot_device.h> #include <commonlib/region.h> #include <console/console.h> @@ -134,6 +135,11 @@ static inline enum mbox_p2c_status find_psp_spi_flash_device_region(u64 target_n return MBOX_PSP_SUCCESS; } +static inline bool spi_controller_available(void) +{ + return !(spi_read8(SPI_MISC_CNTRL) & SPI_SEMAPHORE_DRIVER_LOCKED); +} + enum mbox_p2c_status psp_smi_spi_get_info(struct mbox_default_buffer *buffer) { struct mbox_pspv2_cmd_spi_info *const cmd_buf = |