Commit 04d53cd2 authored by farah kassabri's avatar farah kassabri Committed by Oded Gabbay

habanalabs/gaudi2: get f/w reset status register dynamically

Get the firmware reset status address from the dynamic registers
we read from the firmware instead of using a define.
Signed-off-by: default avatarfarah kassabri <fkassabri@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent f0b6d3cc
...@@ -5439,6 +5439,9 @@ static void gaudi2_execute_soft_reset(struct hl_device *hdev, u32 reset_sleep_ms ...@@ -5439,6 +5439,9 @@ static void gaudi2_execute_soft_reset(struct hl_device *hdev, u32 reset_sleep_ms
if (!driver_performs_reset) { if (!driver_performs_reset) {
/* set SP to indicate reset request sent to FW */ /* set SP to indicate reset request sent to FW */
if (dyn_regs->cpu_rst_status)
WREG32(le32_to_cpu(dyn_regs->cpu_rst_status), CPU_RST_STATUS_NA);
else
WREG32(mmCPU_RST_STATUS_TO_HOST, CPU_RST_STATUS_NA); WREG32(mmCPU_RST_STATUS_TO_HOST, CPU_RST_STATUS_NA);
WREG32(le32_to_cpu(dyn_regs->gic_host_soft_rst_irq), WREG32(le32_to_cpu(dyn_regs->gic_host_soft_rst_irq),
......
...@@ -431,7 +431,9 @@ struct cpu_dyn_regs { ...@@ -431,7 +431,9 @@ struct cpu_dyn_regs {
__le32 gic_host_ints_irq; __le32 gic_host_ints_irq;
__le32 gic_host_soft_rst_irq; __le32 gic_host_soft_rst_irq;
__le32 gic_rot_qm_irq_ctrl; __le32 gic_rot_qm_irq_ctrl;
__le32 reserved1[22]; /* reserve for future use */ __le32 cpu_rst_status;
__le32 eng_arc_irq_ctrl;
__le32 reserved1[20]; /* reserve for future use */
}; };
/* TODO: remove the desc magic after the code is updated to use message */ /* TODO: remove the desc magic after the code is updated to use message */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment