]> git.baikalelectronics.ru Git - kernel.git/commitdiff
habanalabs: check if CoreSight is supported
authorOmer Shpigelman <oshpigelman@habana.ai>
Sun, 10 May 2020 11:10:15 +0000 (14:10 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 19 May 2020 11:48:41 +0000 (14:48 +0300)
Coresight is not supported on simulator, therefore add a boolean for
checking that (currently used by un-upstreamed code).

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h

index b3e2354aaca29a405c5019d44f2c3ea867981980..fb2ff82e0db5c883624a75d8fae7f1fc1ce9a319 100644 (file)
@@ -751,6 +751,7 @@ static int goya_sw_init(struct hl_device *hdev)
        }
 
        spin_lock_init(&goya->hw_queues_lock);
+       hdev->supports_coresight = true;
 
        return 0;
 
index a68df32094f1610d8067ada974d6cb03fee899f3..cfb306daa8d4791998cc22cfed6883dbc73b854e 100644 (file)
@@ -1415,6 +1415,7 @@ struct hl_device_idle_busy_ts {
  * @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.
+ * @supports_coresight: is CoreSight supported.
  */
 struct hl_device {
        struct pci_dev                  *pdev;
@@ -1498,6 +1499,7 @@ struct hl_device {
        u8                              cdev_sysfs_created;
        u8                              stop_on_err;
        u8                              supports_sync_stream;
+       u8                              supports_coresight;
 
        /* Parameters for bring-up */
        u8                              mmu_enable;