diff options
author | Ofir Bitton <obitton@habana.ai> | 2021-04-20 10:15:25 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-06-18 15:23:39 +0300 |
commit | 38fbcc6ec9a3812f355c0360f6e37966ceb24a7c (patch) | |
tree | 97fc60bfce498a90346f78975a055916f0ca22dd /drivers/misc | |
parent | 90bd4798a8bbea05a0383c5f430db9105b40391e (diff) | |
download | linux-38fbcc6ec9a3812f355c0360f6e37966ceb24a7c.tar.xz |
habanalabs: give FW a grace time for configuring iATU
iATU (internal Address Translation Unit of the PCI controller)
configuration is being done by FW right after driver enables
the PCI device. Hence, driver must add a minor sleep afterwards
in order to make sure FW finishes configuring iATU regions.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/pci/pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/pci/pci.c b/drivers/misc/habanalabs/common/pci/pci.c index 9ef6c46a3146..8e7982be6191 100644 --- a/drivers/misc/habanalabs/common/pci/pci.c +++ b/drivers/misc/habanalabs/common/pci/pci.c @@ -430,6 +430,10 @@ int hl_pci_init(struct hl_device *hdev) goto unmap_pci_bars; } + /* Driver must sleep in order for FW to finish the iATU configuration */ + if (hdev->asic_prop.iatu_done_by_fw) + usleep_range(2000, 3000); + return 0; unmap_pci_bars: |