uint64_t vram_size;
u32 msg;
int i, ret = 0;
- int ip_discovery_ver = 0;
/* It can take up to a second for IFWI init to complete on some dGPUs,
* but generally it should be in the 60-100ms range. Normally this starts
* continue.
*/
- ip_discovery_ver = RREG32(mmIP_DISCOVERY_VERSION);
- if ((dev_is_removable(&adev->pdev->dev)) ||
- (ip_discovery_ver == IP_DISCOVERY_V2) ||
- (ip_discovery_ver == IP_DISCOVERY_V4)) {
- for (i = 0; i < 1000; i++) {
- msg = RREG32(mmMP0_SMN_C2PMSG_33);
- if (msg & 0x80000000)
- break;
- msleep(1);
- }
+ for (i = 0; i < 1000; i++) {
+ msg = RREG32(mmMP0_SMN_C2PMSG_33);
+ if (msg & 0x80000000)
+ break;
+ usleep_range(1000, 1100);
}
+
vram_size = (uint64_t)RREG32(mmRCC_CONFIG_MEMSIZE) << 20;
if (vram_size) {