From ca62433f53d1ff48a4f77ef96332122558f90ad3 Mon Sep 17 00:00:00 2001 From: Oded Gabbay Date: Sat, 9 May 2020 12:17:21 +0300 Subject: habanalabs: support clock gating enable/disable In Gaudi there is a feature of clock gating certain engines. Therefore, add this property to the device structure. In addition, due to a limitation of this feature, the driver needs to dynamically enable or disable this feature during run-time. Therefore, add ASIC interface functions to enable/disable this function from the common code. Moreover, this feature must be turned off when the user wishes to debug the ASIC by reading/writing registers and/or memory through the driver's debugfs. Therefore, add an option to enable/disable clock gating via the debugfs interface. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/habanalabs_drv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/misc/habanalabs/habanalabs_drv.c') diff --git a/drivers/misc/habanalabs/habanalabs_drv.c b/drivers/misc/habanalabs/habanalabs_drv.c index 5e73b456facd..822acb5a00bb 100644 --- a/drivers/misc/habanalabs/habanalabs_drv.c +++ b/drivers/misc/habanalabs/habanalabs_drv.c @@ -231,6 +231,7 @@ static void set_driver_behavior_per_device(struct hl_device *hdev) hdev->fw_loading = 1; hdev->cpu_queues_enable = 1; hdev->heartbeat = 1; + hdev->clock_gating = 1; hdev->reset_pcilink = 0; } -- cgit v1.2.3