summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/gaudi
diff options
context:
space:
mode:
authorBharat Jauhari <bjauhari@habana.ai>2021-05-28 13:14:34 +0300
committerOded Gabbay <ogabbay@kernel.org>2021-06-18 15:23:41 +0300
commit4b09901cf71fdb71f7652b22a4f5e033f7defef9 (patch)
treed39c5cb938d9231e81cae139571f8ef0fc2c48db /drivers/misc/habanalabs/gaudi
parent358526be824f311e1db0d192cb9e96d85d27ac1d (diff)
downloadlinux-4b09901cf71fdb71f7652b22a4f5e033f7defef9.tar.xz
habanalabs: enable dram scramble before linux f/w
In current code, for dynamic f/w loading flow, DRAM scrambling is enabled post Linux fit image is loaded to the card. This can cause the device CPU to go into reset state. The correct sequence should be: 1. Load boot fit image 2. Enable scrambling 3. Load Linux fit image This commit aligns the DRAM scrambling enabling with the static f/w load flow. Signed-off-by: Bharat Jauhari <bjauhari@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/gaudi')
-rw-r--r--drivers/misc/habanalabs/gaudi/gaudi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index f8bf30e48bba..ca1a8ca24d4a 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -3804,9 +3804,6 @@ static int gaudi_load_firmware_to_device(struct hl_device *hdev)
{
void __iomem *dst;
- /* HBM scrambler must be initialized before pushing F/W to HBM */
- gaudi_init_scrambler_hbm(hdev);
-
dst = hdev->pcie_bar[HBM_BAR_ID] + LINUX_FW_OFFSET;
return hl_fw_load_fw_to_device(hdev, GAUDI_LINUX_FW_FILE, dst, 0, 0);
@@ -8949,6 +8946,7 @@ static const struct hl_asic_funcs gaudi_funcs = {
.enable_events_from_fw = gaudi_enable_events_from_fw,
.map_pll_idx_to_fw_idx = gaudi_map_pll_idx_to_fw_idx,
.init_firmware_loader = gaudi_init_firmware_loader,
+ .init_cpu_scrambler_dram = gaudi_init_scrambler_hbm
};
/**