Lines Matching refs:psp

54 static int psp_v3_1_ring_stop(struct psp_context *psp,
57 static int psp_v3_1_init_microcode(struct psp_context *psp) in psp_v3_1_init_microcode() argument
59 struct amdgpu_device *adev = psp->adev; in psp_v3_1_init_microcode()
75 err = psp_init_sos_microcode(psp, chip_name); in psp_v3_1_init_microcode()
79 err = psp_init_asd_microcode(psp, chip_name); in psp_v3_1_init_microcode()
86 static int psp_v3_1_bootloader_load_sysdrv(struct psp_context *psp) in psp_v3_1_bootloader_load_sysdrv() argument
90 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sysdrv()
101 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv()
107 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v3_1_bootloader_load_sysdrv()
111 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v3_1_bootloader_load_sysdrv()
119 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv()
125 static int psp_v3_1_bootloader_load_sos(struct psp_context *psp) in psp_v3_1_bootloader_load_sos() argument
129 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sos()
140 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sos()
146 psp_copy_fw(psp, psp->sos.start_addr, psp->sos.size_bytes); in psp_v3_1_bootloader_load_sos()
150 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v3_1_bootloader_load_sos()
157 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_81), in psp_v3_1_bootloader_load_sos()
163 static int psp_v3_1_ring_init(struct psp_context *psp, in psp_v3_1_ring_init() argument
168 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_init()
170 ring = &psp->km_ring; in psp_v3_1_ring_init()
189 static void psp_v3_1_reroute_ih(struct psp_context *psp) in psp_v3_1_reroute_ih() argument
191 struct amdgpu_device *adev = psp->adev; in psp_v3_1_reroute_ih()
204 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_reroute_ih()
216 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_reroute_ih()
220 static int psp_v3_1_ring_create(struct psp_context *psp, in psp_v3_1_ring_create() argument
225 struct psp_ring *ring = &psp->km_ring; in psp_v3_1_ring_create()
226 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_create()
228 psp_v3_1_reroute_ih(psp); in psp_v3_1_ring_create()
232 ret = psp_v3_1_ring_stop(psp, ring_type); in psp_v3_1_ring_create()
254 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, in psp_v3_1_ring_create()
277 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, in psp_v3_1_ring_create()
285 static int psp_v3_1_ring_stop(struct psp_context *psp, in psp_v3_1_ring_stop() argument
289 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_stop()
304 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v3_1_ring_stop()
307 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_ring_stop()
313 static int psp_v3_1_ring_destroy(struct psp_context *psp, in psp_v3_1_ring_destroy() argument
317 struct psp_ring *ring = &psp->km_ring; in psp_v3_1_ring_destroy()
318 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_destroy()
320 ret = psp_v3_1_ring_stop(psp, ring_type); in psp_v3_1_ring_destroy()
331 static bool psp_v3_1_smu_reload_quirk(struct psp_context *psp) in psp_v3_1_smu_reload_quirk() argument
333 struct amdgpu_device *adev = psp->adev; in psp_v3_1_smu_reload_quirk()
340 static int psp_v3_1_mode1_reset(struct psp_context *psp) in psp_v3_1_mode1_reset() argument
344 struct amdgpu_device *adev = psp->adev; in psp_v3_1_mode1_reset()
348 ret = psp_wait_for(psp, offset, 0x80000000, 0x8000FFFF, false); in psp_v3_1_mode1_reset()
362 ret = psp_wait_for(psp, offset, 0x80000000, 0x80000000, false); in psp_v3_1_mode1_reset()
374 static uint32_t psp_v3_1_ring_get_wptr(struct psp_context *psp) in psp_v3_1_ring_get_wptr() argument
377 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_get_wptr()
380 data = psp->km_ring.ring_wptr; in psp_v3_1_ring_get_wptr()
386 static void psp_v3_1_ring_set_wptr(struct psp_context *psp, uint32_t value) in psp_v3_1_ring_set_wptr() argument
388 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_set_wptr()
395 psp->km_ring.ring_wptr = value; in psp_v3_1_ring_set_wptr()
414 void psp_v3_1_set_psp_funcs(struct psp_context *psp) in psp_v3_1_set_psp_funcs() argument
416 psp->funcs = &psp_v3_1_funcs; in psp_v3_1_set_psp_funcs()