diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2022-06-27 22:32:07 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-07-12 09:09:28 +0300 |
commit | 6b4e8a12b2b9a5385b89d25ac450deddb8ed9a62 (patch) | |
tree | de2606a8218f84c89d21e91d98ba2a47a1f7e0f8 /drivers/misc/habanalabs/common/device.c | |
parent | 8aa1e1e605535a0ba7fb80aeeaf94f875a9474c3 (diff) | |
download | linux-6b4e8a12b2b9a5385b89d25ac450deddb8ed9a62.tar.xz |
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 <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/device.c')
-rw-r--r-- | drivers/misc/habanalabs/common/device.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |