From 6b4e8a12b2b9a5385b89d25ac450deddb8ed9a62 Mon Sep 17 00:00:00 2001 From: Oded Gabbay Date: Mon, 27 Jun 2022 22:32:07 +0300 Subject: habanalabs: enable gaudi2 code in driver Enable the Gaudi2 ASIC code in the pci probe callback of the driver so the driver will handle Gaudi2 ASICs. Add the PCI ID to the PCI table and add the ASIC enum value to all relevant places. Fixup the device parameters initialization for Gaudi2. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/common/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/misc/habanalabs/common/device.c') diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c index ff7634d32282..9f3778c82e54 100644 --- a/drivers/misc/habanalabs/common/device.c +++ b/drivers/misc/habanalabs/common/device.c @@ -644,6 +644,14 @@ static int device_early_init(struct hl_device *hdev) gaudi_set_asic_funcs(hdev); strscpy(hdev->asic_name, "GAUDI SEC", sizeof(hdev->asic_name)); break; + case ASIC_GAUDI2: + gaudi2_set_asic_funcs(hdev); + strscpy(hdev->asic_name, "GAUDI2", sizeof(hdev->asic_name)); + break; + case ASIC_GAUDI2_SEC: + gaudi2_set_asic_funcs(hdev); + strscpy(hdev->asic_name, "GAUDI2 SEC", sizeof(hdev->asic_name)); + break; default: dev_err(hdev->dev, "Unrecognized ASIC type %d\n", hdev->asic_type); -- cgit v1.2.3