diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2020-05-09 12:17:21 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2020-05-19 14:48:41 +0300 |
commit | ca62433f53d1ff48a4f77ef96332122558f90ad3 (patch) | |
tree | b1978bc1f2ac06f569725d52fc6aba526f56b891 /drivers/misc/habanalabs/goya/goya.c | |
parent | 803917f960c2a34d16fb0aa6debb80fed59a58b7 (diff) |
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>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goya.c')
-rw-r--r-- | drivers/misc/habanalabs/goya/goya.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c index fb2ff82e0db5..56f415f9120a 100644 --- a/drivers/misc/habanalabs/goya/goya.c +++ b/drivers/misc/habanalabs/goya/goya.c @@ -5018,6 +5018,16 @@ int goya_armcp_info_get(struct hl_device *hdev) return 0; } +static void goya_enable_clock_gating(struct hl_device *hdev) +{ + +} + +static void goya_disable_clock_gating(struct hl_device *hdev) +{ + +} + static bool goya_is_device_idle(struct hl_device *hdev, u32 *mask, struct seq_file *s) { @@ -5239,6 +5249,8 @@ static const struct hl_asic_funcs goya_funcs = { .mmu_invalidate_cache = goya_mmu_invalidate_cache, .mmu_invalidate_cache_range = goya_mmu_invalidate_cache_range, .send_heartbeat = goya_send_heartbeat, + .enable_clock_gating = goya_enable_clock_gating, + .disable_clock_gating = goya_disable_clock_gating, .debug_coresight = goya_debug_coresight, .is_device_idle = goya_is_device_idle, .soft_reset_late_init = goya_soft_reset_late_init, |