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>
This commit is contained in:
parent
0ec0aa7415
commit
81d0d89613
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue