From 975b061e346e830ef14ce9a39e62260bce24a8b6 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Sat, 24 Aug 2024 01:00:44 +0200 Subject: soc/amd/common/psp: move PSP SMI SPI access function prototypes Now that we have the local psp_smi_flash.h header, move the psp_smi_spi_* function prototypes there. Signed-off-by: Felix Held Change-Id: I12cbbabf6a960836fe0c5dc1424c08550cb66a7a Reviewed-on: https://review.coreboot.org/c/coreboot/+/84068 Reviewed-by: Marshall Dawson Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/amd/common/block/psp/psp_def.h | 5 ----- src/soc/amd/common/block/psp/psp_smi.c | 1 + src/soc/amd/common/block/psp/psp_smi_flash.h | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/soc/amd/common/block/psp/psp_def.h b/src/soc/amd/common/block/psp/psp_def.h index e723c84772..d1f57ac19c 100644 --- a/src/soc/amd/common/block/psp/psp_def.h +++ b/src/soc/amd/common/block/psp/psp_def.h @@ -153,9 +153,4 @@ enum cb_err soc_read_c2p38(uint32_t *msg_38_value); void enable_psp_smi(void); -enum mbox_p2c_status psp_smi_spi_get_info(struct mbox_default_buffer *buffer); -enum mbox_p2c_status psp_smi_spi_read(struct mbox_default_buffer *buffer); -enum mbox_p2c_status psp_smi_spi_write(struct mbox_default_buffer *buffer); -enum mbox_p2c_status psp_smi_spi_erase(struct mbox_default_buffer *buffer); - #endif /* __AMD_PSP_DEF_H__ */ diff --git a/src/soc/amd/common/block/psp/psp_smi.c b/src/soc/amd/common/block/psp/psp_smi.c index be7d4cb8bb..ccd03793c9 100644 --- a/src/soc/amd/common/block/psp/psp_smi.c +++ b/src/soc/amd/common/block/psp/psp_smi.c @@ -7,6 +7,7 @@ #include #include #include "psp_def.h" +#include "psp_smi_flash.h" /* PSP to x86 commands */ #define MBOX_PSP_CMD_SPI_INFO 0x83 diff --git a/src/soc/amd/common/block/psp/psp_smi_flash.h b/src/soc/amd/common/block/psp/psp_smi_flash.h index 6f3eb97af0..c9c6a1c9ce 100644 --- a/src/soc/amd/common/block/psp/psp_smi_flash.h +++ b/src/soc/amd/common/block/psp/psp_smi_flash.h @@ -61,3 +61,8 @@ void get_psp_spi_read_write(struct mbox_psp_cmd_spi_read_write *cmd_buf, uint64_t *num_bytes, uint8_t **data); void get_psp_spi_erase(struct mbox_psp_cmd_spi_erase *cmd_buf, uint64_t *target_nv_id, uint64_t *lba, uint64_t *num_blocks); + +enum mbox_p2c_status psp_smi_spi_get_info(struct mbox_default_buffer *buffer); +enum mbox_p2c_status psp_smi_spi_read(struct mbox_default_buffer *buffer); +enum mbox_p2c_status psp_smi_spi_write(struct mbox_default_buffer *buffer); +enum mbox_p2c_status psp_smi_spi_erase(struct mbox_default_buffer *buffer); -- cgit v1.2.3