mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
drm/amdgpu: use spirom update wait_for helper for psp v14
Spirom update typically requires extremely long duration for command execution, and special helper function to wait for it's completion. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b7a9003445
commit
f19cb91615
2 changed files with 7 additions and 1 deletions
|
|
@ -577,7 +577,11 @@ static int psp_v14_0_exec_spi_cmd(struct psp_context *psp, int cmd)
|
|||
WREG32_SOC15(MP0, 0, regMPASP_SMN_C2PMSG_73, 1);
|
||||
|
||||
if (cmd == C2PMSG_CMD_SPI_UPDATE_FLASH_IMAGE)
|
||||
return 0;
|
||||
ret = psp_wait_for_spirom_update(psp, SOC15_REG_OFFSET(MP0, 0, regMPASP_SMN_C2PMSG_115),
|
||||
MBOX_READY_FLAG, MBOX_READY_MASK, PSP_SPIROM_UPDATE_TIMEOUT);
|
||||
else
|
||||
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, regMPASP_SMN_C2PMSG_115),
|
||||
MBOX_READY_FLAG, MBOX_READY_MASK, false);
|
||||
|
||||
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, regMPASP_SMN_C2PMSG_115),
|
||||
MBOX_READY_FLAG, MBOX_READY_MASK, false);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "amdgpu_psp.h"
|
||||
|
||||
#define PSP_SPIROM_UPDATE_TIMEOUT 60000 /* 60s */
|
||||
|
||||
void psp_v14_0_set_psp_funcs(struct psp_context *psp);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue