@@ -152,11 +152,9 @@ static int psp_v11_0_wait_for_bootloader(struct psp_context *psp)
152
152
for (retry_loop = 0 ; retry_loop < 10 ; retry_loop ++ ) {
153
153
/* Wait for bootloader to signify that is
154
154
ready having bit 31 of C2PMSG_35 set to 1 */
155
- ret = psp_wait_for (psp ,
156
- SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
157
- 0x80000000 ,
158
- 0x80000000 ,
159
- false);
155
+ ret = psp_wait_for (
156
+ psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
157
+ 0x80000000 , 0x80000000 , PSP_WAITREG_NOVERBOSE );
160
158
161
159
if (ret == 0 )
162
160
return 0 ;
@@ -252,8 +250,8 @@ static int psp_v11_0_bootloader_load_sos(struct psp_context *psp)
252
250
/* there might be handshake issue with hardware which needs delay */
253
251
mdelay (20 );
254
252
ret = psp_wait_for (psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_81 ),
255
- RREG32_SOC15 (MP0 , 0 , mmMP0_SMN_C2PMSG_81 ),
256
- 0 , true );
253
+ RREG32_SOC15 (MP0 , 0 , mmMP0_SMN_C2PMSG_81 ), 0 ,
254
+ PSP_WAITREG_CHANGED );
257
255
258
256
return ret ;
259
257
}
@@ -279,11 +277,11 @@ static int psp_v11_0_ring_stop(struct psp_context *psp,
279
277
if (amdgpu_sriov_vf (adev ))
280
278
ret = psp_wait_for (
281
279
psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_101 ),
282
- MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , false );
280
+ MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , 0 );
283
281
else
284
282
ret = psp_wait_for (
285
283
psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_64 ),
286
- MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , false );
284
+ MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , 0 );
287
285
288
286
return ret ;
289
287
}
@@ -321,13 +319,13 @@ static int psp_v11_0_ring_create(struct psp_context *psp,
321
319
/* Wait for response flag (bit 31) in C2PMSG_101 */
322
320
ret = psp_wait_for (
323
321
psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_101 ),
324
- MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , false );
322
+ MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , 0 );
325
323
326
324
} else {
327
325
/* Wait for sOS ready for ring creation */
328
326
ret = psp_wait_for (
329
327
psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_64 ),
330
- MBOX_TOS_READY_FLAG , MBOX_TOS_READY_MASK , false );
328
+ MBOX_TOS_READY_FLAG , MBOX_TOS_READY_MASK , 0 );
331
329
if (ret ) {
332
330
DRM_ERROR ("Failed to wait for sOS ready for ring creation\n" );
333
331
return ret ;
@@ -353,7 +351,7 @@ static int psp_v11_0_ring_create(struct psp_context *psp,
353
351
/* Wait for response flag (bit 31) in C2PMSG_64 */
354
352
ret = psp_wait_for (
355
353
psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_64 ),
356
- MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , false );
354
+ MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK , 0 );
357
355
}
358
356
359
357
return ret ;
@@ -387,7 +385,7 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
387
385
offset = SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_64 );
388
386
389
387
ret = psp_wait_for (psp , offset , MBOX_TOS_READY_FLAG ,
390
- MBOX_TOS_READY_MASK , false );
388
+ MBOX_TOS_READY_MASK , 0 );
391
389
392
390
if (ret ) {
393
391
DRM_INFO ("psp is not working correctly before mode1 reset!\n" );
@@ -402,7 +400,7 @@ static int psp_v11_0_mode1_reset(struct psp_context *psp)
402
400
offset = SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_33 );
403
401
404
402
ret = psp_wait_for (psp , offset , MBOX_TOS_RESP_FLAG , MBOX_TOS_RESP_MASK ,
405
- false );
403
+ 0 );
406
404
407
405
if (ret ) {
408
406
DRM_INFO ("psp mode 1 reset failed!\n" );
@@ -428,8 +426,9 @@ static int psp_v11_0_memory_training_send_msg(struct psp_context *psp, int msg)
428
426
429
427
max_wait = MEM_TRAIN_SEND_MSG_TIMEOUT_US / adev -> usec_timeout ;
430
428
for (i = 0 ; i < max_wait ; i ++ ) {
431
- ret = psp_wait_for (psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
432
- 0x80000000 , 0x80000000 , false);
429
+ ret = psp_wait_for (
430
+ psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
431
+ 0x80000000 , 0x80000000 , PSP_WAITREG_NOVERBOSE );
433
432
if (ret == 0 )
434
433
break ;
435
434
}
@@ -608,7 +607,7 @@ static int psp_v11_0_load_usbc_pd_fw(struct psp_context *psp, uint64_t fw_pri_mc
608
607
WREG32_SOC15 (MP0 , 0 , mmMP0_SMN_C2PMSG_36 , (fw_pri_mc_addr >> 20 ));
609
608
610
609
ret = psp_wait_for (psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
611
- 0x80000000 , 0x80000000 , false );
610
+ 0x80000000 , 0x80000000 , 0 );
612
611
if (ret )
613
612
return ret ;
614
613
@@ -645,7 +644,7 @@ static int psp_v11_0_read_usbc_pd_fw(struct psp_context *psp, uint32_t *fw_ver)
645
644
WREG32_SOC15 (MP0 , 0 , mmMP0_SMN_C2PMSG_35 , C2PMSG_CMD_GFX_USB_PD_FW_VER );
646
645
647
646
ret = psp_wait_for (psp , SOC15_REG_OFFSET (MP0 , 0 , mmMP0_SMN_C2PMSG_35 ),
648
- 0x80000000 , 0x80000000 , false );
647
+ 0x80000000 , 0x80000000 , 0 );
649
648
if (!ret )
650
649
* fw_ver = RREG32_SOC15 (MP0 , 0 , mmMP0_SMN_C2PMSG_36 );
651
650
0 commit comments