habanalabs: support clock gating enable/disable
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 9 May 2020 09:17:21 +0000 (12:17 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 19 May 2020 11:48:41 +0000 (14:48 +0300)
commitca62433f53d1ff48a4f77ef96332122558f90ad3
treeb1978bc1f2ac06f569725d52fc6aba526f56b891
parent803917f960c2a34d16fb0aa6debb80fed59a58b7
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 <oded.gabbay@gmail.com>
Documentation/ABI/testing/debugfs-driver-habanalabs
drivers/misc/habanalabs/debugfs.c
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/habanalabs_drv.c