From 81d0d89613c2eb30763c8cd04b36625b856eef38 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 29 Apr 2022 18:38:55 +0200 Subject: soc/amd/common/block/psp/psp_gen2: rename cmd_response to buffer The cmd_response field in the pspv2_mbox struct is the buffer used to pass data to the PSP and back to the x86 side, so rename it to buffer. This also aligns the code a bit more with the reference code. Also rename the wr_mbox_cmd_resp function to wr_mbox_buffer_ptr. Signed-off-by: Felix Held Change-Id: I22c8971b07b3dedcc2e6e50e93c98d69ec7379e8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63962 Reviewed-by: Raul Rangel Reviewed-by: Fred Reitberger Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/psp/psp_gen2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/soc/amd/common') diff --git a/src/soc/amd/common/block/psp/psp_gen2.c b/src/soc/amd/common/block/psp/psp_gen2.c index 67b939131e..6f46d82220 100644 --- a/src/soc/amd/common/block/psp/psp_gen2.c +++ b/src/soc/amd/common/block/psp/psp_gen2.c @@ -23,7 +23,7 @@ struct pspv2_mbox { u32 ready:1; } __packed fields; }; - u64 cmd_response; + u64 buffer; } __packed; static uintptr_t soc_get_psp_base_address(void) @@ -76,9 +76,9 @@ static u8 rd_mbox_recovery(struct pspv2_mbox *mbox) return !!tmp.fields.recovery; } -static void wr_mbox_cmd_resp(struct pspv2_mbox *mbox, void *buffer) +static void wr_mbox_buffer_ptr(struct pspv2_mbox *mbox, void *buffer) { - write64(&mbox->cmd_response, (uintptr_t)buffer); + write64(&mbox->buffer, (uintptr_t)buffer); } static int wait_command(struct pspv2_mbox *mbox, bool wait_for_ready) @@ -121,7 +121,7 @@ int send_psp_command(u32 command, void *buffer) return -PSPSTS_CMD_TIMEOUT; /* set address of command-response buffer and write command register */ - wr_mbox_cmd_resp(mbox, buffer); + wr_mbox_buffer_ptr(mbox, buffer); wr_mbox_cmd(mbox, command); /* PSP clears command register when complete. All commands except -- cgit v1.2.3