summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/common/debugfs.c
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2022-01-06 00:14:45 +0300
committerOded Gabbay <ogabbay@kernel.org>2022-02-28 15:22:01 +0300
commit4edb4ffe39c9bdaec50186d0ca583a7ff01143de (patch)
tree7af9890329c5cb296436408a5c8d89354f1cdf88 /drivers/misc/habanalabs/common/debugfs.c
parenteb85eec858c1a5c11d3a0bff403f6440b05b40dc (diff)
downloadlinux-4edb4ffe39c9bdaec50186d0ca583a7ff01143de.tar.xz
habanalabs/gaudi: disable CGM permanently
Due to the need of SynapseAI to configure all TPC engines from a single QMAN, the driver must disable CGM and never allow the user to enable it. Otherwise, the configuration of the TPC engines will fail. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/debugfs.c')
-rw-r--r--drivers/misc/habanalabs/common/debugfs.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/misc/habanalabs/common/debugfs.c b/drivers/misc/habanalabs/common/debugfs.c
index fc084ee5106e..e3ee5f45d20c 100644
--- a/drivers/misc/habanalabs/common/debugfs.c
+++ b/drivers/misc/habanalabs/common/debugfs.c
@@ -1054,42 +1054,12 @@ static ssize_t hl_device_write(struct file *f, const char __user *buf,
static ssize_t hl_clk_gate_read(struct file *f, char __user *buf,
size_t count, loff_t *ppos)
{
- struct hl_dbg_device_entry *entry = file_inode(f)->i_private;
- struct hl_device *hdev = entry->hdev;
- char tmp_buf[200];
- ssize_t rc;
-
- if (*ppos)
- return 0;
-
- sprintf(tmp_buf, "0x%llx\n", hdev->clock_gating_mask);
- rc = simple_read_from_buffer(buf, count, ppos, tmp_buf,
- strlen(tmp_buf) + 1);
-
- return rc;
+ return 0;
}
static ssize_t hl_clk_gate_write(struct file *f, const char __user *buf,
size_t count, loff_t *ppos)
{
- struct hl_dbg_device_entry *entry = file_inode(f)->i_private;
- struct hl_device *hdev = entry->hdev;
- u64 value;
- ssize_t rc;
-
- if (hdev->reset_info.in_reset) {
- dev_warn_ratelimited(hdev->dev,
- "Can't change clock gating during reset\n");
- return 0;
- }
-
- rc = kstrtoull_from_user(buf, count, 16, &value);
- if (rc)
- return rc;
-
- hdev->clock_gating_mask = value;
- hdev->asic_funcs->set_clock_gating(hdev);
-
return count;
}