Commit 38fbcc6e authored by Ofir Bitton's avatar Ofir Bitton Committed by Oded Gabbay
Browse files

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: default avatarOfir Bitton <obitton@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 90bd4798
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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: