summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/goya/goya_hwmgr.c
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2022-01-08 21:49:12 +0100
committerOded Gabbay <ogabbay@kernel.org>2022-02-28 13:22:02 +0100
commit7ae439a0614f3718df203d9f20eac7b3161867f4 (patch)
tree0703e3dc323a00ad828596d1875fc43944bead05 /drivers/misc/habanalabs/goya/goya_hwmgr.c
parenthabanalabs: move more f/w functions to firmware_if.c (diff)
downloadlinux-7ae439a0614f3718df203d9f20eac7b3161867f4.tar.xz
linux-7ae439a0614f3718df203d9f20eac7b3161867f4.zip
habanalabs: remove asic callback set_pll_profile()
Setting PLL profile is the same for all ASICs, except for GOYA. However, because this function is never called from common code, there is no need to have an asic-specific callback function. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/misc/habanalabs/goya/goya_hwmgr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goya_hwmgr.c b/drivers/misc/habanalabs/goya/goya_hwmgr.c
index f9f3afe94056..7d4f26c67d8e 100644
--- a/drivers/misc/habanalabs/goya/goya_hwmgr.c
+++ b/drivers/misc/habanalabs/goya/goya_hwmgr.c
@@ -11,6 +11,9 @@ void goya_set_pll_profile(struct hl_device *hdev, enum hl_pll_frequency freq)
{
struct goya_device *goya = hdev->asic_specific;
+ if (!hdev->pdev)
+ return;
+
switch (freq) {
case PLL_HIGH:
hl_fw_set_frequency(hdev, HL_GOYA_MME_PLL, hdev->high_pll);