diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-04-29 18:38:55 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-05-02 13:55:43 +0000 |
commit | 81d0d89613c2eb30763c8cd04b36625b856eef38 (patch) | |
tree | 7d8d20b99beadd94892bf51da45198ab789dc9ce /src | |
parent | 0ec0aa74154ddf9d82e8e26fd6ce19d144d6c9cc (diff) |
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 <felix-coreboot@felixheld.de>
Change-Id: I22c8971b07b3dedcc2e6e50e93c98d69ec7379e8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63962
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/amd/common/block/psp/psp_gen2.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 |