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()
67 err = psp_init_sos_microcode(psp, ucode_prefix); in psp_v3_1_init_microcode()
71 err = psp_init_asd_microcode(psp, ucode_prefix); in psp_v3_1_init_microcode()
78 static int psp_v3_1_bootloader_load_sysdrv(struct psp_context *psp) in psp_v3_1_bootloader_load_sysdrv() argument
82 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sysdrv()
93 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv()
99 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v3_1_bootloader_load_sysdrv()
103 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v3_1_bootloader_load_sysdrv()
111 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv()
117 static int psp_v3_1_bootloader_load_sos(struct psp_context *psp) in psp_v3_1_bootloader_load_sos() argument
121 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sos()
132 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sos()
138 psp_copy_fw(psp, psp->sos.start_addr, psp->sos.size_bytes); in psp_v3_1_bootloader_load_sos()
142 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v3_1_bootloader_load_sos()
149 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_81), in psp_v3_1_bootloader_load_sos()
155 static void psp_v3_1_reroute_ih(struct psp_context *psp) in psp_v3_1_reroute_ih() argument
157 struct amdgpu_device *adev = psp->adev; in psp_v3_1_reroute_ih()
170 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_reroute_ih()
182 psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_reroute_ih()
186 static int psp_v3_1_ring_create(struct psp_context *psp, in psp_v3_1_ring_create() argument
191 struct psp_ring *ring = &psp->km_ring; in psp_v3_1_ring_create()
192 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_create()
194 psp_v3_1_reroute_ih(psp); in psp_v3_1_ring_create()
198 ret = psp_v3_1_ring_stop(psp, ring_type); in psp_v3_1_ring_create()
220 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, in psp_v3_1_ring_create()
243 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, in psp_v3_1_ring_create()
251 static int psp_v3_1_ring_stop(struct psp_context *psp, in psp_v3_1_ring_stop() argument
255 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_stop()
270 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v3_1_ring_stop()
273 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v3_1_ring_stop()
279 static int psp_v3_1_ring_destroy(struct psp_context *psp, in psp_v3_1_ring_destroy() argument
283 struct psp_ring *ring = &psp->km_ring; in psp_v3_1_ring_destroy()
284 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_destroy()
286 ret = psp_v3_1_ring_stop(psp, ring_type); in psp_v3_1_ring_destroy()
297 static bool psp_v3_1_smu_reload_quirk(struct psp_context *psp) in psp_v3_1_smu_reload_quirk() argument
299 struct amdgpu_device *adev = psp->adev; in psp_v3_1_smu_reload_quirk()
306 static int psp_v3_1_mode1_reset(struct psp_context *psp) in psp_v3_1_mode1_reset() argument
310 struct amdgpu_device *adev = psp->adev; in psp_v3_1_mode1_reset()
314 ret = psp_wait_for(psp, offset, 0x80000000, 0x8000FFFF, false); in psp_v3_1_mode1_reset()
328 ret = psp_wait_for(psp, offset, 0x80000000, 0x80000000, false); in psp_v3_1_mode1_reset()
340 static uint32_t psp_v3_1_ring_get_wptr(struct psp_context *psp) in psp_v3_1_ring_get_wptr() argument
343 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_get_wptr()
346 data = psp->km_ring.ring_wptr; in psp_v3_1_ring_get_wptr()
352 static void psp_v3_1_ring_set_wptr(struct psp_context *psp, uint32_t value) in psp_v3_1_ring_set_wptr() argument
354 struct amdgpu_device *adev = psp->adev; in psp_v3_1_ring_set_wptr()
361 psp->km_ring.ring_wptr = value; in psp_v3_1_ring_set_wptr()
379 void psp_v3_1_set_psp_funcs(struct psp_context *psp) in psp_v3_1_set_psp_funcs() argument
381 psp->funcs = &psp_v3_1_funcs; in psp_v3_1_set_psp_funcs()