mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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 <ogabbay@kernel.org>
This commit is contained in:
parent
f5137aff6d
commit
83f14f2f9b
|
|
@ -1566,6 +1566,11 @@ static int gaudi_late_init(struct hl_device *hdev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
/* Scrub both SRAM and DRAM */
|
||||
rc = hdev->asic_funcs->scrub_device_mem(hdev, 0, 0);
|
||||
if (rc)
|
||||
goto disable_pci_access;
|
||||
|
||||
rc = gaudi_fetch_psoc_frequency(hdev);
|
||||
if (rc) {
|
||||
dev_err(hdev->dev, "Failed to fetch psoc frequency\n");
|
||||
|
|
@ -4193,11 +4198,6 @@ static int gaudi_hw_init(struct hl_device *hdev)
|
|||
goto disable_msi;
|
||||
}
|
||||
|
||||
/* Scrub both SRAM and DRAM */
|
||||
rc = hdev->asic_funcs->scrub_device_mem(hdev, 0, 0);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* Perform read from the device to flush all configuration */
|
||||
RREG32(mmHW_STATE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user