Skip to content

Commit 83f14f2

Browse files
committed
habanalabs/gaudi: move scrubbing to late init
HW init is mostly about configuring registers. Therefore, it is better to activate DMAs only in late init and afterwards. Signed-off-by: Oded Gabbay <[email protected]>
1 parent f5137af commit 83f14f2

File tree

1 file changed

+5
-5
lines changed
  • drivers/misc/habanalabs/gaudi

1 file changed

+5
-5
lines changed

drivers/misc/habanalabs/gaudi/gaudi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,6 +1566,11 @@ static int gaudi_late_init(struct hl_device *hdev)
15661566
return rc;
15671567
}
15681568

1569+
/* Scrub both SRAM and DRAM */
1570+
rc = hdev->asic_funcs->scrub_device_mem(hdev, 0, 0);
1571+
if (rc)
1572+
goto disable_pci_access;
1573+
15691574
rc = gaudi_fetch_psoc_frequency(hdev);
15701575
if (rc) {
15711576
dev_err(hdev->dev, "Failed to fetch psoc frequency\n");
@@ -4193,11 +4198,6 @@ static int gaudi_hw_init(struct hl_device *hdev)
41934198
goto disable_msi;
41944199
}
41954200

4196-
/* Scrub both SRAM and DRAM */
4197-
rc = hdev->asic_funcs->scrub_device_mem(hdev, 0, 0);
4198-
if (rc)
4199-
return rc;
4200-
42014201
/* Perform read from the device to flush all configuration */
42024202
RREG32(mmHW_STATE);
42034203

0 commit comments

Comments
 (0)