Commit 24915338 authored by Oded Gabbay's avatar Oded Gabbay
Browse files

habanalabs: remove power9 workaround for dma support



We don't need this workaround anymore.

Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent b62ff1a4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2604,8 +2604,6 @@ struct hl_reset_info {
 * @in_debug: whether the device is in a state where the profiling/tracing infrastructure
 *            can be used. This indication is needed because in some ASICs we need to do
 *            specific operations to enable that infrastructure.
 * @power9_64bit_dma_enable: true to enable 64-bit DMA mask support. Relevant
 *                           only to POWER9 machines.
 * @cdev_sysfs_created: were char devices and sysfs nodes created.
 * @stop_on_err: true if engines should stop on error.
 * @supports_sync_stream: is sync stream supported.
@@ -2728,7 +2726,6 @@ struct hl_device {
	u8				device_cpu_disabled;
	u8				dma_mask;
	u8				in_debug;
	u8				power9_64bit_dma_enable;
	u8				cdev_sysfs_created;
	u8				stop_on_err;
	u8				supports_sync_stream;
+1 −4
Original line number Diff line number Diff line
@@ -338,9 +338,6 @@ int hl_pci_set_outbound_region(struct hl_device *hdev,
				lower_32_bits(outbound_region_end_address));
	rc |= hl_pci_iatu_write(hdev, 0x014, 0);

	if ((hdev->power9_64bit_dma_enable) && (hdev->dma_mask == 64))
		rc |= hl_pci_iatu_write(hdev, 0x018, 0x08000000);
	else
	rc |= hl_pci_iatu_write(hdev, 0x018, 0);

	rc |= hl_pci_iatu_write(hdev, 0x020,
+1 −8
Original line number Diff line number Diff line
@@ -9008,15 +9008,8 @@ static void gaudi_reset_sob(struct hl_device *hdev, void *data)

static void gaudi_set_dma_mask_from_fw(struct hl_device *hdev)
{
	if (RREG32(mmPSOC_GLOBAL_CONF_NON_RST_FLOPS_0) ==
							HL_POWER9_HOST_MAGIC) {
		hdev->power9_64bit_dma_enable = 1;
		hdev->dma_mask = 64;
	} else {
		hdev->power9_64bit_dma_enable = 0;
	hdev->dma_mask = 48;
}
}

static u64 gaudi_get_device_time(struct hl_device *hdev)
{
+1 −10
Original line number Diff line number Diff line
@@ -5554,17 +5554,8 @@ static void goya_reset_sob_group(struct hl_device *hdev, u16 sob_group)

static void goya_set_dma_mask_from_fw(struct hl_device *hdev)
{
	if (RREG32(mmPSOC_GLOBAL_CONF_NON_RST_FLOPS_0) ==
							HL_POWER9_HOST_MAGIC) {
		dev_dbg(hdev->dev, "Working in 64-bit DMA mode\n");
		hdev->power9_64bit_dma_enable = 1;
		hdev->dma_mask = 64;
	} else {
		dev_dbg(hdev->dev, "Working in 48-bit DMA mode\n");
		hdev->power9_64bit_dma_enable = 0;
	hdev->dma_mask = 48;
}
}

u64 goya_get_device_time(struct hl_device *hdev)
{