summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/goya
diff options
context:
space:
mode:
authorDalit Ben Zoor <dbenzoor@habana.ai>2019-03-20 16:13:23 +0200
committerOded Gabbay <oded.gabbay@gmail.com>2019-03-20 16:13:23 +0200
commita691a1ebb59e7f2a159df8d3c693e2235c5de9dd (patch)
treeb103cb50c192faa0c2cc10e68a047b1d71b7a674 /drivers/misc/habanalabs/goya
parent0878a42086e0a6228f804655bb544147a531bb57 (diff)
habanalabs: set new golden value to tpc clock relaxation
On init or context switch, set TPC clock relaxation counter register to a golden value. Signed-off-by: Dalit Ben Zoor <dbenzoor@habana.ai> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/goya')
-rw-r--r--drivers/misc/habanalabs/goya/goya.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index c69f3b928350..9f775dd81a52 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -1436,6 +1436,7 @@ static void goya_init_golden_registers(struct hl_device *hdev)
*/
WREG32(mmDMA_CH_0_CFG0, 0x0fff0010);
WREG32(mmDMA_CH_1_CFG0, 0x0fff00F0);
+ WREG32(mmTPC_PLL_CLK_RLX_0, 0x200020);
goya->hw_cap_initialized |= HW_CAP_GOLDEN;
}
@@ -4458,6 +4459,7 @@ static int goya_context_switch(struct hl_device *hdev, u32 asid)
return rc;
}
+ WREG32(mmTPC_PLL_CLK_RLX_0, 0x200020);
goya_mmu_prepare(hdev, asid);
return 0;