2 * Copyright 2016 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
26 #include <linux/firmware.h>
29 #include "amdgpu_psp.h"
30 #include "amdgpu_ucode.h"
31 #include "soc15_common.h"
34 #include "mp/mp_9_0_offset.h"
35 #include "mp/mp_9_0_sh_mask.h"
36 #include "gc/gc_9_0_offset.h"
37 #include "sdma0/sdma0_4_0_offset.h"
38 #include "nbio/nbio_6_1_offset.h"
40 MODULE_FIRMWARE("amdgpu/vega10_sos.bin");
41 MODULE_FIRMWARE("amdgpu/vega10_asd.bin");
42 MODULE_FIRMWARE("amdgpu/vega12_sos.bin");
43 MODULE_FIRMWARE("amdgpu/vega12_asd.bin");
44 MODULE_FIRMWARE("amdgpu/vega20_sos.bin");
45 MODULE_FIRMWARE("amdgpu/vega20_asd.bin");
48 #define smnMP1_FIRMWARE_FLAGS 0x3010028
50 static uint32_t sos_old_versions
[] = {1517616, 1510592, 1448594, 1446554};
53 psp_v3_1_get_fw_type(struct amdgpu_firmware_info
*ucode
, enum psp_gfx_fw_type
*type
)
55 switch(ucode
->ucode_id
) {
56 case AMDGPU_UCODE_ID_SDMA0
:
57 *type
= GFX_FW_TYPE_SDMA0
;
59 case AMDGPU_UCODE_ID_SDMA1
:
60 *type
= GFX_FW_TYPE_SDMA1
;
62 case AMDGPU_UCODE_ID_CP_CE
:
63 *type
= GFX_FW_TYPE_CP_CE
;
65 case AMDGPU_UCODE_ID_CP_PFP
:
66 *type
= GFX_FW_TYPE_CP_PFP
;
68 case AMDGPU_UCODE_ID_CP_ME
:
69 *type
= GFX_FW_TYPE_CP_ME
;
71 case AMDGPU_UCODE_ID_CP_MEC1
:
72 *type
= GFX_FW_TYPE_CP_MEC
;
74 case AMDGPU_UCODE_ID_CP_MEC1_JT
:
75 *type
= GFX_FW_TYPE_CP_MEC_ME1
;
77 case AMDGPU_UCODE_ID_CP_MEC2
:
78 *type
= GFX_FW_TYPE_CP_MEC
;
80 case AMDGPU_UCODE_ID_CP_MEC2_JT
:
81 *type
= GFX_FW_TYPE_CP_MEC_ME2
;
83 case AMDGPU_UCODE_ID_RLC_G
:
84 *type
= GFX_FW_TYPE_RLC_G
;
86 case AMDGPU_UCODE_ID_SMC
:
87 *type
= GFX_FW_TYPE_SMU
;
89 case AMDGPU_UCODE_ID_UVD
:
90 *type
= GFX_FW_TYPE_UVD
;
92 case AMDGPU_UCODE_ID_VCE
:
93 *type
= GFX_FW_TYPE_VCE
;
95 case AMDGPU_UCODE_ID_MAXIMUM
:
103 static int psp_v3_1_init_microcode(struct psp_context
*psp
)
105 struct amdgpu_device
*adev
= psp
->adev
;
106 const char *chip_name
;
109 const struct psp_firmware_header_v1_0
*hdr
;
113 switch (adev
->asic_type
) {
115 chip_name
= "vega10";
118 chip_name
= "vega12";
123 snprintf(fw_name
, sizeof(fw_name
), "amdgpu/%s_sos.bin", chip_name
);
124 err
= request_firmware(&adev
->psp
.sos_fw
, fw_name
, adev
->dev
);
128 err
= amdgpu_ucode_validate(adev
->psp
.sos_fw
);
132 hdr
= (const struct psp_firmware_header_v1_0
*)adev
->psp
.sos_fw
->data
;
133 adev
->psp
.sos_fw_version
= le32_to_cpu(hdr
->header
.ucode_version
);
134 adev
->psp
.sos_feature_version
= le32_to_cpu(hdr
->ucode_feature_version
);
135 adev
->psp
.sos_bin_size
= le32_to_cpu(hdr
->sos_size_bytes
);
136 adev
->psp
.sys_bin_size
= le32_to_cpu(hdr
->header
.ucode_size_bytes
) -
137 le32_to_cpu(hdr
->sos_size_bytes
);
138 adev
->psp
.sys_start_addr
= (uint8_t *)hdr
+
139 le32_to_cpu(hdr
->header
.ucode_array_offset_bytes
);
140 adev
->psp
.sos_start_addr
= (uint8_t *)adev
->psp
.sys_start_addr
+
141 le32_to_cpu(hdr
->sos_offset_bytes
);
143 snprintf(fw_name
, sizeof(fw_name
), "amdgpu/%s_asd.bin", chip_name
);
144 err
= request_firmware(&adev
->psp
.asd_fw
, fw_name
, adev
->dev
);
148 err
= amdgpu_ucode_validate(adev
->psp
.asd_fw
);
152 hdr
= (const struct psp_firmware_header_v1_0
*)adev
->psp
.asd_fw
->data
;
153 adev
->psp
.asd_fw_version
= le32_to_cpu(hdr
->header
.ucode_version
);
154 adev
->psp
.asd_feature_version
= le32_to_cpu(hdr
->ucode_feature_version
);
155 adev
->psp
.asd_ucode_size
= le32_to_cpu(hdr
->header
.ucode_size_bytes
);
156 adev
->psp
.asd_start_addr
= (uint8_t *)hdr
+
157 le32_to_cpu(hdr
->header
.ucode_array_offset_bytes
);
163 "psp v3.1: Failed to load firmware \"%s\"\n",
165 release_firmware(adev
->psp
.sos_fw
);
166 adev
->psp
.sos_fw
= NULL
;
167 release_firmware(adev
->psp
.asd_fw
);
168 adev
->psp
.asd_fw
= NULL
;
174 static int psp_v3_1_bootloader_load_sysdrv(struct psp_context
*psp
)
177 uint32_t psp_gfxdrv_command_reg
= 0;
178 struct amdgpu_device
*adev
= psp
->adev
;
181 /* Check sOS sign of life register to confirm sys driver and sOS
182 * are already been loaded.
184 sol_reg
= RREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_81
);
188 /* Wait for bootloader to signify that is ready having bit 31 of C2PMSG_35 set to 1 */
189 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_35
),
190 0x80000000, 0x80000000, false);
194 memset(psp
->fw_pri_buf
, 0, PSP_1_MEG
);
196 /* Copy PSP System Driver binary to memory */
197 memcpy(psp
->fw_pri_buf
, psp
->sys_start_addr
, psp
->sys_bin_size
);
199 /* Provide the sys driver to bootrom */
200 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_36
,
201 (uint32_t)(psp
->fw_pri_mc_addr
>> 20));
202 psp_gfxdrv_command_reg
= 1 << 16;
203 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_35
,
204 psp_gfxdrv_command_reg
);
206 /* there might be handshake issue with hardware which needs delay */
209 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_35
),
210 0x80000000, 0x80000000, false);
215 static bool psp_v3_1_match_version(struct amdgpu_device
*adev
, uint32_t ver
)
219 if (ver
== adev
->psp
.sos_fw_version
)
223 * Double check if the latest four legacy versions.
224 * If yes, it is still the right version.
226 for (i
= 0; i
< sizeof(sos_old_versions
) / sizeof(uint32_t); i
++) {
227 if (sos_old_versions
[i
] == adev
->psp
.sos_fw_version
)
234 static int psp_v3_1_bootloader_load_sos(struct psp_context
*psp
)
237 unsigned int psp_gfxdrv_command_reg
= 0;
238 struct amdgpu_device
*adev
= psp
->adev
;
239 uint32_t sol_reg
, ver
;
241 /* Check sOS sign of life register to confirm sys driver and sOS
242 * are already been loaded.
244 sol_reg
= RREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_81
);
248 /* Wait for bootloader to signify that is ready having bit 31 of C2PMSG_35 set to 1 */
249 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_35
),
250 0x80000000, 0x80000000, false);
254 memset(psp
->fw_pri_buf
, 0, PSP_1_MEG
);
256 /* Copy Secure OS binary to PSP memory */
257 memcpy(psp
->fw_pri_buf
, psp
->sos_start_addr
, psp
->sos_bin_size
);
259 /* Provide the PSP secure OS to bootrom */
260 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_36
,
261 (uint32_t)(psp
->fw_pri_mc_addr
>> 20));
262 psp_gfxdrv_command_reg
= 2 << 16;
263 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_35
,
264 psp_gfxdrv_command_reg
);
266 /* there might be handshake issue with hardware which needs delay */
268 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_81
),
269 RREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_81
),
272 ver
= RREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_58
);
273 if (!psp_v3_1_match_version(adev
, ver
))
274 DRM_WARN("SOS version doesn't match\n");
279 static int psp_v3_1_prep_cmd_buf(struct amdgpu_firmware_info
*ucode
,
280 struct psp_gfx_cmd_resp
*cmd
)
283 uint64_t fw_mem_mc_addr
= ucode
->mc_addr
;
285 memset(cmd
, 0, sizeof(struct psp_gfx_cmd_resp
));
287 cmd
->cmd_id
= GFX_CMD_ID_LOAD_IP_FW
;
288 cmd
->cmd
.cmd_load_ip_fw
.fw_phy_addr_lo
= lower_32_bits(fw_mem_mc_addr
);
289 cmd
->cmd
.cmd_load_ip_fw
.fw_phy_addr_hi
= upper_32_bits(fw_mem_mc_addr
);
290 cmd
->cmd
.cmd_load_ip_fw
.fw_size
= ucode
->ucode_size
;
292 ret
= psp_v3_1_get_fw_type(ucode
, &cmd
->cmd
.cmd_load_ip_fw
.fw_type
);
294 DRM_ERROR("Unknown firmware type\n");
299 static int psp_v3_1_ring_init(struct psp_context
*psp
,
300 enum psp_ring_type ring_type
)
303 struct psp_ring
*ring
;
304 struct amdgpu_device
*adev
= psp
->adev
;
306 ring
= &psp
->km_ring
;
308 ring
->ring_type
= ring_type
;
310 /* allocate 4k Page of Local Frame Buffer memory for ring */
311 ring
->ring_size
= 0x1000;
312 ret
= amdgpu_bo_create_kernel(adev
, ring
->ring_size
, PAGE_SIZE
,
313 AMDGPU_GEM_DOMAIN_VRAM
,
314 &adev
->firmware
.rbuf
,
315 &ring
->ring_mem_mc_addr
,
316 (void **)&ring
->ring_mem
);
325 static int psp_v3_1_ring_create(struct psp_context
*psp
,
326 enum psp_ring_type ring_type
)
329 unsigned int psp_ring_reg
= 0;
330 struct psp_ring
*ring
= &psp
->km_ring
;
331 struct amdgpu_device
*adev
= psp
->adev
;
333 /* Write low address of the ring to C2PMSG_69 */
334 psp_ring_reg
= lower_32_bits(ring
->ring_mem_mc_addr
);
335 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_69
, psp_ring_reg
);
336 /* Write high address of the ring to C2PMSG_70 */
337 psp_ring_reg
= upper_32_bits(ring
->ring_mem_mc_addr
);
338 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_70
, psp_ring_reg
);
339 /* Write size of ring to C2PMSG_71 */
340 psp_ring_reg
= ring
->ring_size
;
341 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_71
, psp_ring_reg
);
342 /* Write the ring initialization command to C2PMSG_64 */
343 psp_ring_reg
= ring_type
;
344 psp_ring_reg
= psp_ring_reg
<< 16;
345 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_64
, psp_ring_reg
);
347 /* there might be handshake issue with hardware which needs delay */
350 /* Wait for response flag (bit 31) in C2PMSG_64 */
351 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_64
),
352 0x80000000, 0x8000FFFF, false);
357 static int psp_v3_1_ring_stop(struct psp_context
*psp
,
358 enum psp_ring_type ring_type
)
361 struct psp_ring
*ring
;
362 unsigned int psp_ring_reg
= 0;
363 struct amdgpu_device
*adev
= psp
->adev
;
365 ring
= &psp
->km_ring
;
367 /* Write the ring destroy command to C2PMSG_64 */
368 psp_ring_reg
= 3 << 16;
369 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_64
, psp_ring_reg
);
371 /* there might be handshake issue with hardware which needs delay */
374 /* Wait for response flag (bit 31) in C2PMSG_64 */
375 ret
= psp_wait_for(psp
, SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_64
),
376 0x80000000, 0x80000000, false);
381 static int psp_v3_1_ring_destroy(struct psp_context
*psp
,
382 enum psp_ring_type ring_type
)
385 struct psp_ring
*ring
= &psp
->km_ring
;
386 struct amdgpu_device
*adev
= psp
->adev
;
388 ret
= psp_v3_1_ring_stop(psp
, ring_type
);
390 DRM_ERROR("Fail to stop psp ring\n");
392 amdgpu_bo_free_kernel(&adev
->firmware
.rbuf
,
393 &ring
->ring_mem_mc_addr
,
394 (void **)&ring
->ring_mem
);
399 static int psp_v3_1_cmd_submit(struct psp_context
*psp
,
400 struct amdgpu_firmware_info
*ucode
,
401 uint64_t cmd_buf_mc_addr
, uint64_t fence_mc_addr
,
404 unsigned int psp_write_ptr_reg
= 0;
405 struct psp_gfx_rb_frame
* write_frame
= psp
->km_ring
.ring_mem
;
406 struct psp_ring
*ring
= &psp
->km_ring
;
407 struct psp_gfx_rb_frame
*ring_buffer_start
= ring
->ring_mem
;
408 struct psp_gfx_rb_frame
*ring_buffer_end
= ring_buffer_start
+
409 ring
->ring_size
/ sizeof(struct psp_gfx_rb_frame
) - 1;
410 struct amdgpu_device
*adev
= psp
->adev
;
411 uint32_t ring_size_dw
= ring
->ring_size
/ 4;
412 uint32_t rb_frame_size_dw
= sizeof(struct psp_gfx_rb_frame
) / 4;
414 /* KM (GPCOM) prepare write pointer */
415 psp_write_ptr_reg
= RREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_67
);
417 /* Update KM RB frame pointer to new frame */
418 /* write_frame ptr increments by size of rb_frame in bytes */
419 /* psp_write_ptr_reg increments by size of rb_frame in DWORDs */
420 if ((psp_write_ptr_reg
% ring_size_dw
) == 0)
421 write_frame
= ring_buffer_start
;
423 write_frame
= ring_buffer_start
+ (psp_write_ptr_reg
/ rb_frame_size_dw
);
424 /* Check invalid write_frame ptr address */
425 if ((write_frame
< ring_buffer_start
) || (ring_buffer_end
< write_frame
)) {
426 DRM_ERROR("ring_buffer_start = %p; ring_buffer_end = %p; write_frame = %p\n",
427 ring_buffer_start
, ring_buffer_end
, write_frame
);
428 DRM_ERROR("write_frame is pointing to address out of bounds\n");
432 /* Initialize KM RB frame */
433 memset(write_frame
, 0, sizeof(struct psp_gfx_rb_frame
));
435 /* Update KM RB frame */
436 write_frame
->cmd_buf_addr_hi
= upper_32_bits(cmd_buf_mc_addr
);
437 write_frame
->cmd_buf_addr_lo
= lower_32_bits(cmd_buf_mc_addr
);
438 write_frame
->fence_addr_hi
= upper_32_bits(fence_mc_addr
);
439 write_frame
->fence_addr_lo
= lower_32_bits(fence_mc_addr
);
440 write_frame
->fence_value
= index
;
442 /* Update the write Pointer in DWORDs */
443 psp_write_ptr_reg
= (psp_write_ptr_reg
+ rb_frame_size_dw
) % ring_size_dw
;
444 WREG32_SOC15(MP0
, 0, mmMP0_SMN_C2PMSG_67
, psp_write_ptr_reg
);
450 psp_v3_1_sram_map(struct amdgpu_device
*adev
,
451 unsigned int *sram_offset
, unsigned int *sram_addr_reg_offset
,
452 unsigned int *sram_data_reg_offset
,
453 enum AMDGPU_UCODE_ID ucode_id
)
458 /* TODO: needs to confirm */
460 case AMDGPU_UCODE_ID_SMC
:
462 *sram_addr_reg_offset
= 0;
463 *sram_data_reg_offset
= 0;
467 case AMDGPU_UCODE_ID_CP_CE
:
469 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_CE_UCODE_ADDR
);
470 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_CE_UCODE_DATA
);
473 case AMDGPU_UCODE_ID_CP_PFP
:
475 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_PFP_UCODE_ADDR
);
476 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_PFP_UCODE_DATA
);
479 case AMDGPU_UCODE_ID_CP_ME
:
481 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_HYP_ME_UCODE_ADDR
);
482 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_HYP_ME_UCODE_DATA
);
485 case AMDGPU_UCODE_ID_CP_MEC1
:
486 *sram_offset
= 0x10000;
487 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_MEC_ME1_UCODE_ADDR
);
488 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_MEC_ME1_UCODE_DATA
);
491 case AMDGPU_UCODE_ID_CP_MEC2
:
492 *sram_offset
= 0x10000;
493 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_HYP_MEC2_UCODE_ADDR
);
494 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmCP_HYP_MEC2_UCODE_DATA
);
497 case AMDGPU_UCODE_ID_RLC_G
:
498 *sram_offset
= 0x2000;
499 *sram_addr_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmRLC_GPM_UCODE_ADDR
);
500 *sram_data_reg_offset
= SOC15_REG_OFFSET(GC
, 0, mmRLC_GPM_UCODE_DATA
);
503 case AMDGPU_UCODE_ID_SDMA0
:
505 *sram_addr_reg_offset
= SOC15_REG_OFFSET(SDMA0
, 0, mmSDMA0_UCODE_ADDR
);
506 *sram_data_reg_offset
= SOC15_REG_OFFSET(SDMA0
, 0, mmSDMA0_UCODE_DATA
);
509 /* TODO: needs to confirm */
511 case AMDGPU_UCODE_ID_SDMA1
:
513 *sram_addr_reg_offset
= ;
516 case AMDGPU_UCODE_ID_UVD
:
518 *sram_addr_reg_offset
= ;
521 case AMDGPU_UCODE_ID_VCE
:
523 *sram_addr_reg_offset
= ;
527 case AMDGPU_UCODE_ID_MAXIMUM
:
536 static bool psp_v3_1_compare_sram_data(struct psp_context
*psp
,
537 struct amdgpu_firmware_info
*ucode
,
538 enum AMDGPU_UCODE_ID ucode_type
)
541 unsigned int fw_sram_reg_val
= 0;
542 unsigned int fw_sram_addr_reg_offset
= 0;
543 unsigned int fw_sram_data_reg_offset
= 0;
544 unsigned int ucode_size
;
545 uint32_t *ucode_mem
= NULL
;
546 struct amdgpu_device
*adev
= psp
->adev
;
548 err
= psp_v3_1_sram_map(adev
, &fw_sram_reg_val
, &fw_sram_addr_reg_offset
,
549 &fw_sram_data_reg_offset
, ucode_type
);
553 WREG32(fw_sram_addr_reg_offset
, fw_sram_reg_val
);
555 ucode_size
= ucode
->ucode_size
;
556 ucode_mem
= (uint32_t *)ucode
->kaddr
;
558 fw_sram_reg_val
= RREG32(fw_sram_data_reg_offset
);
560 if (*ucode_mem
!= fw_sram_reg_val
)
571 static bool psp_v3_1_smu_reload_quirk(struct psp_context
*psp
)
573 struct amdgpu_device
*adev
= psp
->adev
;
576 reg
= smnMP1_FIRMWARE_FLAGS
| 0x03b00000;
577 WREG32_SOC15(NBIO
, 0, mmPCIE_INDEX2
, reg
);
578 reg
= RREG32_SOC15(NBIO
, 0, mmPCIE_DATA2
);
579 return (reg
& MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED_MASK
) ? true : false;
582 static int psp_v3_1_mode1_reset(struct psp_context
*psp
)
586 struct amdgpu_device
*adev
= psp
->adev
;
588 offset
= SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_64
);
590 ret
= psp_wait_for(psp
, offset
, 0x80000000, 0x8000FFFF, false);
593 DRM_INFO("psp is not working correctly before mode1 reset!\n");
597 /*send the mode 1 reset command*/
598 WREG32(offset
, 0x70000);
602 offset
= SOC15_REG_OFFSET(MP0
, 0, mmMP0_SMN_C2PMSG_33
);
604 ret
= psp_wait_for(psp
, offset
, 0x80000000, 0x80000000, false);
607 DRM_INFO("psp mode 1 reset failed!\n");
611 DRM_INFO("psp mode1 reset succeed \n");
616 static const struct psp_funcs psp_v3_1_funcs
= {
617 .init_microcode
= psp_v3_1_init_microcode
,
618 .bootloader_load_sysdrv
= psp_v3_1_bootloader_load_sysdrv
,
619 .bootloader_load_sos
= psp_v3_1_bootloader_load_sos
,
620 .prep_cmd_buf
= psp_v3_1_prep_cmd_buf
,
621 .ring_init
= psp_v3_1_ring_init
,
622 .ring_create
= psp_v3_1_ring_create
,
623 .ring_stop
= psp_v3_1_ring_stop
,
624 .ring_destroy
= psp_v3_1_ring_destroy
,
625 .cmd_submit
= psp_v3_1_cmd_submit
,
626 .compare_sram_data
= psp_v3_1_compare_sram_data
,
627 .smu_reload_quirk
= psp_v3_1_smu_reload_quirk
,
628 .mode1_reset
= psp_v3_1_mode1_reset
,
631 void psp_v3_1_set_psp_funcs(struct psp_context
*psp
)
633 psp
->funcs
= &psp_v3_1_funcs
;